67 lines
1.6 KiB
YAML
67 lines
1.6 KiB
YAML
# Prometheus Configuration for AniWorld Monitoring
|
|
|
|
global:
|
|
scrape_interval: 15s
|
|
evaluation_interval: 15s
|
|
|
|
rule_files:
|
|
- "alerts.yml"
|
|
|
|
alerting:
|
|
alertmanagers:
|
|
- static_configs:
|
|
- targets:
|
|
- alertmanager:9093
|
|
|
|
scrape_configs:
|
|
# AniWorld Application Metrics
|
|
- job_name: 'aniworld-web'
|
|
static_configs:
|
|
- targets: ['aniworld-web:5000']
|
|
metrics_path: '/api/health/metrics'
|
|
scrape_interval: 30s
|
|
scrape_timeout: 10s
|
|
|
|
# System Metrics (Node Exporter)
|
|
- job_name: 'node-exporter'
|
|
static_configs:
|
|
- targets: ['node-exporter:9100']
|
|
|
|
# Redis Metrics
|
|
- job_name: 'redis'
|
|
static_configs:
|
|
- targets: ['redis-exporter:9121']
|
|
|
|
# Nginx Metrics
|
|
- job_name: 'nginx'
|
|
static_configs:
|
|
- targets: ['nginx-exporter:9113']
|
|
|
|
# Prometheus Self-Monitoring
|
|
- job_name: 'prometheus'
|
|
static_configs:
|
|
- targets: ['localhost:9090']
|
|
|
|
# Health Check Monitoring
|
|
- job_name: 'aniworld-health'
|
|
static_configs:
|
|
- targets: ['aniworld-web:5000']
|
|
metrics_path: '/api/health/system'
|
|
scrape_interval: 60s
|
|
|
|
# Blackbox Exporter for External Monitoring
|
|
- job_name: 'blackbox'
|
|
metrics_path: /probe
|
|
params:
|
|
module: [http_2xx]
|
|
static_configs:
|
|
- targets:
|
|
- http://aniworld-web:5000/health
|
|
- http://aniworld-web:5000/api/health/ready
|
|
relabel_configs:
|
|
- source_labels: [__address__]
|
|
target_label: __param_target
|
|
- source_labels: [__param_target]
|
|
target_label: instance
|
|
- target_label: __address__
|
|
replacement: blackbox-exporter:9115 |