Enable mysqld_exporter for prometheus hosts
This commit is contained in:
parent
8bc5793d70
commit
1f3e76e4f6
3 changed files with 22 additions and 0 deletions
|
@ -10,6 +10,25 @@ scrape_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: snmp
|
||||
scheme: https
|
||||
tls_config:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue