# 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'] %if %%getVar('activerSndNodeExpoter','non') == 'oui' - targets: ['%%nom_domaine_machine:9100'] %end if - job_name: '%%job_name_node' file_sd_configs: - files: [ "%%job_file_config/*.yml" ] static_configs: %if %%getVar('ajout_client_prometheus','non') == 'oui' %for %%cliPr in %%getVar('prCli',[]) %if %%cliPr.CliSonde == 'Node Exporter' - targets: ['%%client_prometheus:9100'] %end if %end for %end if #alerting: # alertmanagers: # - scheme: https # static_configs: # - targets: # - "1.2.3.4:9093" # - "1.2.3.5:9093" # - "1.2.3.6:9093"