ansible/roles/prometheus_federate/templates/prometheus.yml.j2
Alexandre Iooss 2830558545
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
prometheus_federation: add ilo_snmp and remove django
2021-12-31 20:04:24 +01:00

43 lines
985 B
Django/Jinja

---
{{ ansible_managed | comment }}
global:
external_labels:
monitor: '{{ ansible_fqdn }}'
alerting:
alertmanagers:
- static_configs:
- targets: ['{{ prometheus_alertmanager }}']
rule_files:
- 'alert.rules.yml'
scrape_configs:
- job_name: federate
scrape_interval: 30s
metrics_path: '/federate'
honor_labels: true
honor_timestamps: true
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[]:
- '{job="servers"}'
- '{job="postgresql"}'
- '{job="prometheus"}'
- '{job="unifi_snmp"}'
- '{job="ups_snmp"}'
- '{job="apc_pdu_snmp"}'
- '{job="docker"}'
- '{job="switch_snmp"}'
- '{job="ipmi"}'
- '{job="ilo_snmp"}'
...