# {{ ansible_managed }} global: scrape_interval: 15s evaluation_interval: 15s rule_files: - /etc/prometheus/rules/*.yml scrape_configs: - job_name: 'prometheus' static_configs: - targets: ['localhost:9090'] labels: instance: "{{ inventory_hostname }}" {% for job in prometheus_server_jobs %} - job_name: '{{ job }}' metrics_path: /proxy params: module: - {{ job }} scheme: https tls_config: ca_file: /etc/ssl/prometheus/ca-crt.pem cert_file: /etc/ssl/prometheus/server/scrape-crt.pem key_file: /etc/ssl/prometheus/server/scrape-key.pem file_sd_configs: - files: - "/etc/prometheus/jobs/{{ job }}/*.yml" {% endfor %} ## TODO: temporary test - job_name: 'ping' metrics_path: /proxy params: module: - blackbox - icmp scheme: https tls_config: ca_file: /etc/ssl/prometheus/ca-crt.pem cert_file: /etc/ssl/prometheus/server/scrape-crt.pem key_file: /etc/ssl/prometheus/server/scrape-key.pem static_configs: - targets: - 62.99.185.129 - 9.9.9.9 relabel_configs: - source_labels: [__address__] target_label: __param_target - source_labels: [__param_target] target_label: instance - target_label: __address__ replacement: 192.168.32.230:9999 - job_name: 'https' metrics_path: /proxy params: module: - blackbox - http_tls_2xx scheme: https tls_config: ca_file: /etc/ssl/prometheus/ca-crt.pem cert_file: /etc/ssl/prometheus/server/scrape-crt.pem key_file: /etc/ssl/prometheus/server/scrape-key.pem static_configs: - targets: - web.chaos-at-home.org relabel_configs: - source_labels: [__address__] target_label: __param_target - source_labels: [__param_target] target_label: instance - target_label: __address__ replacement: 192.168.32.230:9999 - job_name: 'ssh' metrics_path: /proxy params: module: - blackbox - ssh_banner scheme: https tls_config: ca_file: /etc/ssl/prometheus/ca-crt.pem cert_file: /etc/ssl/prometheus/server/scrape-crt.pem key_file: /etc/ssl/prometheus/server/scrape-key.pem static_configs: - targets: - 192.168.32.230:222 relabel_configs: - source_labels: [__address__] target_label: __param_target - target_label: instance replacement: 'ch-mon' - target_label: __address__ replacement: 192.168.32.230:9999