prometheus: First version of role
This commit is contained in:
parent
051acc86cc
commit
9b1aa236c5
6 changed files with 172 additions and 0 deletions
10
roles/prometheus/templates/node.json.j2
Normal file
10
roles/prometheus/templates/node.json.j2
Normal file
|
@ -0,0 +1,10 @@
|
|||
[
|
||||
{
|
||||
"labels": {
|
||||
"instance": "{{ item }}"
|
||||
},
|
||||
"targets": [
|
||||
"{{ item }}"
|
||||
]
|
||||
}
|
||||
]
|
16
roles/prometheus/templates/prometheus.yml.j2
Normal file
16
roles/prometheus/templates/prometheus.yml.j2
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
global:
|
||||
scrape_interval: 1m
|
||||
scrape_timeout: 10s
|
||||
evaluation_interval: 1m
|
||||
|
||||
scrape_configs:
|
||||
- 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:
|
||||
- /srv/prometheus/node.d/*.json
|
Loading…
Add table
Add a link
Reference in a new issue