A comprehensive monitoring solution using CNCF tools for both metrics and logs monitoring. This stack provides a complete observability solution for your applications and infrastructure.
- Architecture
- Components
- Prerequisites
- Getting Started
- Services Monitoring
- Configuration
- Access UIs
- Security
- License
This monitoring stack consists of two main pillars:
graph LR
A[Node Exporter] --> B[Prometheus]
D[cAdvisor] --> B
B --> C[Grafana]
style A fill:#e6b800
style B fill:#e6522c
style C fill:#F46800
style D fill:#00b33c
graph LR
A[Services] --> B[Promtail]
B --> C[Loki]
C --> D[Grafana]
style A fill:#4db8ff
style B fill:#3399ff
style C fill:#0066cc
style D fill:#F46800
Component | Version | Description |
---|---|---|
Prometheus | v2.47.2 | Time series database for metrics |
Node Exporter | v1.7.0 | System metrics exporter |
cAdvisor | v0.52.1 | Container metrics exporter |
Loki | v3.5.0 | Log aggregation system |
Promtail | v3.5.0 | Log collector and forwarder |
Grafana | v11.6.1 | Visualization and analytics platform |
- Docker Engine (latest version)
- Docker Compose v2.x
- At least 4GB of RAM
- 10GB of free disk space
- Clone the repository:
git clone https://github.com/deepraj1729/complete-monitoring-stack.git
cd complete-monitoring-stack
- Create a Docker network:
docker network create prod-network
- Start the monitoring stack:
cd monitoring
docker compose up -d
- Start the services stack (optional):
cd ../services
docker compose up -d
The stack monitors the following services:
Service | Port | Description |
---|---|---|
Nginx | 80 | Web server |
Redis | 6379 | Cache service |
PostgreSQL | 5432 | Relational database |
MongoDB | 27017 | NoSQL database |
RabbitMQ | 5672, 15672 | Message broker |
- Configuration file:
monitoring/prometheus/config.yml
- Scrape interval: 15s
- Node Exporter metrics:
node_exporter:9100
- Exposes: Host system metrics
- Mount points:
/proc
: Process information/sys
: System information/
: Root filesystem
- Exposes: Container metrics
- Docker socket:
/var/run/docker.sock
- Configuration file:
monitoring/loki/config.yaml
- HTTP port: 3100
- Retention: Default settings
- Storage: Local filesystem
- Configuration file:
monitoring/promtail/config.yaml
- Targets:
- System logs
- Docker container logs
- Service-specific logs
- Configuration file:
monitoring/grafana/datasource.yml
- Default datasources:
- Prometheus (default)
- Loki
Service | URL | Default Credentials |
---|---|---|
Grafana | http://localhost:3000 | admin / GrAfAnA@2025 |
Prometheus | http://localhost:9090 | N/A |
RabbitMQ Management | http://localhost:15672 | admin / password123 |
- All sensitive credentials are defined in docker-compose files
- Default passwords should be changed in production
- Network isolation using Docker network 'prod-network'
- Volumes are used for persistent storage
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by Deepraj