How ruanbekker/docker-monitoring-stack-gpnc works
Project Type and Purpose
• This is a Docker-Compose-based, full-stack monitoring solution.
• Purpose: collect host/container metrics, scrape and store time-series data, aggregate logs, provide dashboards, and handle alerts.
File Structure
• Top level:
• docker-compose.yml defines orchestration of containers.
• configs/ holds per-service configuration.
• dashboards/ contains Grafana dashboard JSON files.
• No traditional “frontend/backend” folders—each service is its own container microservice.
README for Insights
• Lists the seven components:
• Grafana (dashboard UI)
• Prometheus (metrics TSDB + scraper)
• Node-Exporter & cAdvisor (metrics sources)
• Alertmanager (alerting engine)
• Uncomplicated Alert Receiver (alert-view UI)
• Loki + Promtail (log ingestion & storage)
Main Components & Their Roles
a. Infrastructure Layer
• Docker Host running Docker Compose
b. Metrics Collection
• Node Exporter → exposes host metrics
• cAdvisor → exposes container metrics
c. Metrics Storage & Processing
• Prometheus → pulls from Node Exporter & cAdvisor, stores time-series, evaluates rules
d. Alerting
• Alertmanager → receives alerts from Prometheus
• Uncomplicated Alert Receiver → UI for Alertmanager
e. Logging
• Promtail → agent reading container logs, pushing to Loki
• Loki → log aggregation and storage
f. Visualization
• Grafana → reads dashboards from JSON, connects to Prometheus and Loki
Relationships & Data Flows
• Node Exporter & cAdvisor “→” Prometheus (scrape over HTTP)
• Prometheus “→” Alertmanager (push alerts when rules fire)
• Alertmanager “→” Uncomplicated Alert Receiver (for UI viewing)
• Promtail “→” Loki (push log streams)
• Grafana “↔” Prometheus (query metrics)
• Grafana “↔” Loki (query logs)
Architectural Patterns & Principles
• Container-based microservices, each single-purpose
• Separation of concerns: metrics vs logs vs alerting vs visualization
• Declarative provisioning: configs/ folder for each service
• Immutable infrastructure: spin up via Docker Compose