71 lines
1.9 KiB
Django/Jinja
71 lines
1.9 KiB
Django/Jinja
---
|
|
global:
|
|
scrape_interval: 1m
|
|
scrape_timeout: 10s
|
|
evaluation_interval: 1m
|
|
|
|
scrape_configs:
|
|
- job_name: prometheus
|
|
static_configs:
|
|
- targets:
|
|
- "127.0.0.1:9090"
|
|
|
|
- job_name: mysqld
|
|
scheme: https
|
|
tls_config:
|
|
ca_file: "{{ tls_certs }}/ca.crt"
|
|
key_file: "{{ tls_private }}/{{ inventory_hostname }}.key"
|
|
cert_file: "{{ tls_certs }}/{{ inventory_hostname }}.crt"
|
|
static_configs:
|
|
- targets:
|
|
{% for host in groups['sqldb'] %}
|
|
- {{ host }}:3306
|
|
{% endfor %}
|
|
relabel_configs:
|
|
- source_labels: [__address__]
|
|
target_label: __param_target
|
|
- source_labels: [__param_target]
|
|
target_label: instance
|
|
- target_label: __address__
|
|
replacement: {{ inventory_hostname }}:9104
|
|
|
|
- job_name: nginx
|
|
scheme: https
|
|
tls_config:
|
|
ca_file: "{{ tls_certs }}/ca.crt"
|
|
key_file: "{{ tls_private }}/{{ inventory_hostname }}.key"
|
|
cert_file: "{{ tls_certs }}/{{ inventory_hostname }}.crt"
|
|
static_configs:
|
|
- targets:
|
|
- {{ inventory_hostname }}:9113
|
|
|
|
- job_name: snmp
|
|
scheme: https
|
|
tls_config:
|
|
ca_file: "{{ tls_certs }}/ca.crt"
|
|
key_file: "{{ tls_private }}/{{ inventory_hostname }}.key"
|
|
cert_file: "{{ tls_certs }}/{{ inventory_hostname }}.crt"
|
|
static_configs:
|
|
- targets:
|
|
- 172.20.25.102
|
|
metrics_path: /snmp
|
|
params:
|
|
auth: [public_v2]
|
|
module: [if_mib]
|
|
relabel_configs:
|
|
- source_labels: [__address__]
|
|
target_label: __param_target
|
|
- source_labels: [__param_target]
|
|
target_label: instance
|
|
- target_label: __address__
|
|
replacement: nms.home.foo.sh:9116
|
|
|
|
- job_name: node
|
|
scheme: https
|
|
tls_config:
|
|
ca_file: "{{ tls_certs }}/ca.crt"
|
|
key_file: "{{ tls_private }}/{{ inventory_hostname }}.key"
|
|
cert_file: "{{ tls_certs }}/{{ inventory_hostname }}.crt"
|
|
file_sd_configs:
|
|
- files:
|
|
- /etc/prometheus/node.d/*.json
|