Add Prometheus and Grafana services with alerting configuration

This commit is contained in:
elfateh4
2025-12-01 19:18:08 +01:00
parent 47e640b969
commit a924adee27
4 changed files with 170 additions and 0 deletions

43
prometheus.yml Normal file
View File

@@ -0,0 +1,43 @@
global:
scrape_interval: 15s
evaluation_interval: 15s
rule_files:
- rules.yml
alerting:
alertmanagers:
- static_configs:
- targets:
- alertmanager:9093
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: 'traefik'
static_configs:
- targets: ['traefik:8080']
metrics_path: /metrics
- job_name: 'authelia'
static_configs:
- targets: ['authelia:9091']
- job_name: 'grafana'
static_configs:
- targets: ['grafana:3000']
- job_name: 'docker'
docker_sd_configs:
- host: unix:///var/run/docker.sock
relabel_configs:
- source_labels: [__meta_docker_container_name]
regex: '/(.*)'
target_label: container_name
- source_labels: [__meta_docker_container_label_com_docker_compose_service]
target_label: service
- action: keep
source_labels: [__meta_docker_container_label_com_docker_compose_service]
regex: '.*'