Add observability stack with Grafana, Prometheus, Loki, and cAdvisor

- Introduced a new Grafana dashboard for monitoring Docker containers using cAdvisor.
- Created provisioning files for Grafana dashboards and data sources.
- Added Dockerfiles and configuration files for Loki and Prometheus.
- Implemented a Docker Compose stack for the observability services.
- Configured Traefik as a reverse proxy for the services with appropriate routing.
- Added scripts for SSH tunneling to access the telemetry dashboard.
- Included secrets management for Grafana admin credentials.
This commit is contained in:
2026-01-18 15:36:23 +01:00
parent 38b651cb0b
commit 9b143e7638
24 changed files with 19139 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
discovery.docker "containers" {
host = "unix:///var/run/docker.sock"
}
discovery.relabel "swarm" {
targets = []
rule {
source_labels = ["__meta_docker_container_name"]
regex = "^/?(.*)$"
target_label = "container_name"
}
}
loki.source.docker "docker" {
host = "unix:///var/run/docker.sock"
targets = discovery.docker.containers.targets
relabel_rules = discovery.relabel.swarm.rules
forward_to = [loki.write.default.receiver]
labels = { job = "docker" } // label stable pour requêter
}
loki.write "default" {
endpoint {
url = "http://loki:3100/loki/api/v1/push"
}
}