- 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.
29 lines
633 B
Plaintext
29 lines
633 B
Plaintext
|
|
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"
|
|
}
|
|
} |