Files
ansible-en-role/templates/vmagent-config.yml.j2
2024-04-19 12:01:55 +02:00

42 lines
1.2 KiB
Django/Jinja

scrape_configs:
- job_name: external-node
static_configs:
- targets: ['external_node:{{ metrics_port }}']
relabel_configs:
- source_labels: [instance]
target_label: instance
replacement: '{{ node_name | mandatory }}'
- job_name: vmagent
static_configs:
- targets:
- "127.0.0.1:8429"
relabel_configs:
- source_labels: [instance]
target_label: instance
replacement: '{{ node_name | mandatory }}'
- job_name: cadvisor
static_configs:
- targets:
- "cadvisor:8080"
relabel_configs:
- source_labels: [instance]
target_label: instance
replacement: '{{ node_name | mandatory }}'
- job_name: postgres-exporter
static_configs:
- targets:
- "postgres-exporter:9187"
relabel_configs:
- source_labels: [instance]
target_label: instance
replacement: '{{ node_name | mandatory }}'
- job_name: traefik
static_configs:
- targets:
# traefik uses network host, so docker DNS wouldn't work.
- "127.0.0.1:8080"
relabel_configs:
- source_labels: [instance]
target_label: instance
replacement: '{{ node_name | mandatory }}'