prometheus-mt-container/prometheus.yml

109 lines
3.3 KiB
YAML
Raw Normal View History

2024-11-01 15:02:27 +02:00
# my global config
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
- 172.20.90.93:9093
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
- alert.rules.yml
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: "prometheus"
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
- job_name: 'node_exporter'
metrics_path: /metrics
scrape_interval: 30s
scrape_timeout: 20s
http_sd_configs:
- url: "http://172.20.90.80:8080/blackbox/node_exporter.json"
- job_name: 'mysqld_exporter'
metrics_path: /metrics
scrape_interval: 30s
scrape_timeout: 20s
http_sd_configs:
- url: "http://172.20.90.80:8080/blackbox/mysqld_exporter.json"
- job_name: 'blackbox-tcp'
metrics_path: /probe
params:
module: [tcp_connect]
scrape_interval: 30s
scrape_timeout: 20s
http_sd_configs:
- url: "http://172.20.90.80:8080/blackbox/blackbox-tcp.json"
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 172.20.90.15:9115 # Blackbox exporter.
- job_name: 'blackbox-icmp'
metrics_path: /probe
params:
module: [icmp]
scrape_interval: 30s
scrape_timeout: 20s
http_sd_configs:
- url: "http://172.20.90.80:8080/blackbox/blackbox-icmp.json"
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- source_labels: [hostname]
target_label: __param_target
- target_label: __address__
replacement: 172.20.90.15:9115 # Blackbox exporter.
- job_name: 'blackbox-http_2xx_3xx_403'
metrics_path: /probe
params:
module: [http_2xx_3xx_403]
scrape_interval: 30s
scrape_timeout: 20s
http_sd_configs:
- url: "http://172.20.90.80:8080/blackbox/blackbox-http_2xx_3xx_403.json"
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 172.20.90.15:9115 # Blackbox exporter.
- job_name: 'blackbox-tcp_connect_tls'
metrics_path: /probe
params:
module: [tcp_connect_tls]
scrape_interval: 30s
scrape_timeout: 20s
http_sd_configs:
- url: "http://172.20.90.80:8080/blackbox/blackbox-tcp_connect_tls.json"
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 172.20.90.15:9115 # Blackbox exporter.