2018-04-16 12:54:20 +02:00
|
|
|
# my global config
|
|
|
|
global:
|
|
|
|
scrape_interval: %%prometheusScrapeInterval
|
|
|
|
evaluation_interval: %%prometheusEvaluationInterval
|
|
|
|
scrape_timeout: %%prometheusScrapeTimeout
|
|
|
|
|
|
|
|
rule_files:
|
|
|
|
- "/etc/prometheus/rules.d/*.yml"
|
|
|
|
|
|
|
|
scrape_configs:
|
2018-06-04 11:16:18 +02:00
|
|
|
- job_name: %%prometheusJobName
|
2018-04-17 12:32:05 +02:00
|
|
|
honor_labels: true
|
2018-04-16 12:54:20 +02:00
|
|
|
|
|
|
|
static_configs:
|
2018-06-04 11:16:18 +02:00
|
|
|
- targets: ['%%nom_domaine_machine:9090'%slurp
|
2018-06-01 11:27:07 +02:00
|
|
|
%if %%getVar('activerSndNodeExpoter','non') == 'oui'
|
2018-06-04 11:16:18 +02:00
|
|
|
, '%%nom_domaine_machine:9100'%slurp
|
2018-06-01 11:27:07 +02:00
|
|
|
%end if
|
2018-06-04 11:16:18 +02:00
|
|
|
]
|
2018-04-17 12:32:05 +02:00
|
|
|
|
|
|
|
- job_name: '%%job_name_node'
|
|
|
|
file_sd_configs:
|
|
|
|
- files: [ "%%job_file_config/*.yml" ]
|
2018-06-04 11:16:18 +02:00
|
|
|
%if %%is_empty('ajout_client_prometheus') or %%is_empty('addPrOpenCli')
|
|
|
|
# Nothing to configure
|
|
|
|
%else
|
2018-05-28 16:57:39 +02:00
|
|
|
static_configs:
|
2018-06-05 14:27:32 +02:00
|
|
|
- targets: [ "%%adresse_ip_eth0:9100"%slurp
|
2018-06-04 11:16:18 +02:00
|
|
|
%if %%getVar('ajout_client_prometheus','non') == 'oui'
|
|
|
|
%for %%cliPr in %%getVar('prCli',[])
|
|
|
|
%if %%cliPr.prCliSonde == 'Node Exporter'
|
|
|
|
, '%%cliPr.prCliIP:9100'%slurp
|
|
|
|
%end if
|
|
|
|
%end for
|
2018-06-04 10:28:55 +02:00
|
|
|
%end if
|
2018-06-04 11:16:18 +02:00
|
|
|
%if %%getVar('addPrOpenCli','non') == 'oui'
|
|
|
|
%for %%cliOpen in %%getVar('prOpenCli',[])
|
|
|
|
, '%%cliOpen.prOpenCliIP:%%cliOpen.prOpenCliPort'%slurp
|
|
|
|
%end for
|
|
|
|
%end if
|
|
|
|
]
|
2018-05-28 16:57:39 +02:00
|
|
|
%end if
|
2018-06-05 16:46:23 +02:00
|
|
|
|
2018-06-06 09:05:55 +02:00
|
|
|
%if %%getVar('activerAlertmanager','non') == 'oui'
|
|
|
|
alerting:
|
|
|
|
alertmanagers:
|
|
|
|
- scheme: http
|
|
|
|
static_configs:
|
|
|
|
- targets:
|
|
|
|
- "%%nom_domaine_machine:9093"
|
|
|
|
%end if
|