summaryrefslogtreecommitdiff
path: root/roles/monitoring/prometheus/server/templates/jobs/node.j2
blob: ba9eab314dd3c4ff19d98579bdb7cd8583f3e670 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  - job_name: '{{ job }}'
    metrics_path: /proxy
    params:
      module:
      - {{ job }}
    scheme: https
    tls_config:
      ca_file: /etc/ssl/prometheus/ca-crt.pem
      cert_file: /etc/ssl/prometheus/server/scrape-crt.pem
      key_file: /etc/ssl/prometheus/server/scrape-key.pem
    file_sd_configs:
    - files:
      - "/etc/prometheus/targets/{{ job }}/*.yml"
    metric_relabel_configs:
    - source_labels: [ "mountpoint" ]
      regex: ".*/\\.snapshot/.*"
      action: drop
    - source_labels: [ "__name__", "state" ]
      regex: "node_systemd_unit_state;(activating|deactivating|inactive)"
      action: drop