diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2021-12-12 16:46:59 +0000 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2021-12-12 16:46:59 +0000 |
commit | a988a9b62f6b18e50767288c30b869b829f72560 (patch) | |
tree | 486309802e9ad9bb63f641caa8d1b7f1abe6f642 /roles/grafana/templates/datasources-default.yml.j2 | |
parent | 3b1b854855c703d026a47d870f71e648908e4e59 (diff) | |
download | rules-a988a9b62f6b18e50767288c30b869b829f72560.tar.gz |
roles: Add grafana
Diffstat (limited to 'roles/grafana/templates/datasources-default.yml.j2')
-rw-r--r-- | roles/grafana/templates/datasources-default.yml.j2 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/roles/grafana/templates/datasources-default.yml.j2 b/roles/grafana/templates/datasources-default.yml.j2 new file mode 100644 index 0000000..1414ff2 --- /dev/null +++ b/roles/grafana/templates/datasources-default.yml.j2 @@ -0,0 +1,12 @@ +# managed by Ansible +{% import 'macros.j2' as macros with context %} + +apiVersion: 1 + +datasources: +{% call(h) macros.loop_valid_hosts("servers") %} + - name: {{ h.inventory_hostname }}-prometheus + type: prometheus + url: http://{{ h.__ip.internal }}:9090 + +{% endcall %} |