~xenrox/ansible

ref: 705389cb6932f67f216c210492a8acc2af89d780 ansible/roles/prometheus/templates/prometheus.yml.j2 -rw-r--r-- 1.2 KiB
705389cbThorben Günther prometheus: Scrape keycloak 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Alertmanager configuration
alerting:
  alertmanagers:
    - static_configs:
        - targets:
            - localhost:9093

# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
  - rules.yml
  - archlinux.yml
  - backup.yml

scrape_configs:
  - job_name: "node_exporter"
    static_configs:
      {% for host in groups['prometheus_clients'] %}

      - targets: ["{{ hostvars[host]['wireguard_address'] }}:9100"]
        labels:
          instance: "{{ host }}"

      {% endfor %}

      - targets: ["localhost:9100"]
        labels:
          instance: "xenrox.net"

  - job_name: "pushgateway"
    honor_labels: true
    static_configs:
      - targets: ["push.xenrox.net"]
    basic_auth:
      username: "{{ prometheus_secrets['pushgateway_user'] }}"
      password: "{{ prometheus_secrets['pushgateway_pass'] }}"

  - job_name: "minio"
    bearer_token: "{{ minio_jwt }}"
    metrics_path: /minio/v2/metrics/cluster
    scheme: https
    static_configs:
      - targets: ['minio.xenrox.net']

  - job_name: "keycloak"
    metrics_path: /auth/realms/master/metrics
    scheme: https
    static_configs:
      - targets: ["keycloak.xenrox.net"]