summaryrefslogtreecommitdiff
path: root/roles/monitoring/prometheus/server/templates/jobs/node.j2
blob: 1b14e1f69dc8af0d8febf1d5f0e8eae559f33f1e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  - job_name: '{{ job }}'
    metrics_path: /{{ 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