ansible/roles/prometheus_federate/templates/prometheus.yml.j2

43 lines
952 B
Text
Raw Normal View History

---
{{ ansible_managed | comment }}
2021-02-10 20:42:37 +01:00
global:
external_labels:
monitor: '{{ ansible_fqdn }}'
2021-02-10 20:42:37 +01:00
alerting:
alertmanagers:
- static_configs:
- targets: ['{{ prometheus_alertmanager }}']
2021-02-10 20:42:37 +01:00
rule_files:
- 'alert.rules.yml'
2021-02-10 20:42:37 +01:00
scrape_configs:
- job_name: federate
scrape_interval: 30s
2021-02-10 20:42:37 +01:00
metrics_path: '/federate'
honor_labels: true
honor_timestamps: true
2021-02-10 20:42:37 +01:00
file_sd_configs:
- files:
- '/etc/prometheus/targets.json'
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: __address__
replacement: '$1:9090'
params:
match[]:
2021-02-10 20:42:37 +01:00
- '{job="servers"}'
- '{job="postgresql"}'
2021-02-10 20:42:37 +01:00
- '{job="prometheus"}'
- '{job="unifi_snmp"}'
- '{job="django"}'
- '{job="ups_snmp"}'
- '{job="django"}'
- '{job="docker"}'
2021-03-06 02:41:58 +01:00
- '{job="switch_snmp"}'
...