global:
scrape_interval: 15s
evaluation_interval: 15s
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager:9093
# Load rules
rule_files:
- "memory_alerts.yml"
# - "second_rules.yml"
# A scrape configuration containing endpoints to scrape
scrape_configs:
- job_name: "prometheus"
static_configs:
- targets: ["localhost:9090"]
- job_name: "node-exporter"
static_configs:
- targets: ["node-exporter:9100"]
- job_name: "cadvisor"
static_configs:
- targets: ["cadvisor:8080"]
# Add specific container monitoring (memory-stress container)
- job_name: "memory-stress-container"
metrics_path: /metrics
static_configs:
- targets: ["cadvisor:8080"]
metric_relabel_configs:
# Only keep metrics from our memory-stress container
- source_labels: [container_name]
regex: "memory-stress"
action: keep