infra-role-grafana/templates/prometheus.yml.j2

21 lines
466 B
Django/Jinja

apiVersion: 1
datasources:
{% for service in grafana_prometheus_sources %}
- name: {{ service.name }}
type: prometheus
orgId: 1
access: proxy
url: http://{{ service.addr }}:{{ service.port }}/{{ service.path | default("") }}
withCredentials: false
isDefault: {{ loop.first }}
timeInterval: {{ service.interval | default(30) }}
jsonData:
httpMethod: GET
tlsAuth: false
tlsAuthWithCACert: false
version: 1
editable: true
{% endfor %}