eole-prometheus/tmpl/prometheus.yml

51 lines
1.3 KiB
YAML

# my global config
global:
scrape_interval: %%prometheusScrapeInterval
evaluation_interval: %%prometheusEvaluationInterval
scrape_timeout: %%prometheusScrapeTimeout
rule_files:
- "/etc/prometheus/rules.d/*.yml"
scrape_configs:
- job_name: %%prometheusJobName
honor_labels: true
static_configs:
- targets: ['%%nom_domaine_machine:9090'%slurp
%if %%getVar('activerSndNodeExpoter','non') == 'oui'
, '%%nom_domaine_machine:9100'%slurp
%end if
]
- job_name: '%%job_name_node'
file_sd_configs:
- files: [ "%%job_file_config/*.yml" ]
%if %%is_empty('ajout_client_prometheus') or %%is_empty('addPrOpenCli')
# Nothing to configure
%else
static_configs:
- targets: [ "127.0.0.1:9100"%slurp
%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
%end if
%if %%getVar('addPrOpenCli','non') == 'oui'
%for %%cliOpen in %%getVar('prOpenCli',[])
, '%%cliOpen.prOpenCliIP:%%cliOpen.prOpenCliPort'%slurp
%end for
%end if
]
%end if
#alerting:
# alertmanagers:
# - scheme: https
# static_configs:
# - targets:
# - "1.2.3.4:9093"
# - "1.2.3.5:9093"
# - "1.2.3.6:9093"