How adtigupta/observability_scope works
Project type and purpose
• This is an observability‐focused DevOps stack that demonstrates real‐time infrastructure and application monitoring. It uses Docker Compose to orchestrate:
• Prometheus (metrics collector)
• Grafana (visualization)
• cAdvisor (container resource monitoring)
• Node Exporter (host OS/hardware metrics)
• A sample “Notes App” (Django + React) to generate custom application metrics
File structure
• Top-level files:
• docker-compose.yaml – defines all services (Prometheus, Grafana, cAdvisor, Node Exporter, Notes App) on a custom “monitoring” network.
• prometheus.yml – scrape targets and job definitions.
• notes-app/ – full-stack sample application:
• api/ – Django REST API (models, serializers, views, URLs, migrations)
• notesapp/ – Django project settings, wsgi/asgi, URL routing
• staticfiles/ – collected Django static + React build artifacts
• mynotes/ – React code (src/, public/, package.json) and Dockerfile
• Dockerfile, Jenkinsfile – CI/CD and containerization for Notes App
Extract architecture details from README
• Custom bridge network “monitoring” for inter‐service communication
• Persisted volumes: prometheus_data, grafana_data
• Grafana dashboards preconfigured to query Prometheus
• Notes App exposes both UI (React) and REST API + metrics endpoint
Main components
a. Docker Host
b. Docker Network: “monitoring”
c. Containers:
– Node Exporter (9100)
– cAdvisor (8080)
– Prometheus (9090) with attached volume (prometheus_data)
– Grafana (3000) with attached volume (grafana_data)
– Notes App container:
• Django REST API (8000)
• React static UI
• DB: SQLite (embedded file inside container)
d. External Users/Clients:
– DevOps engineer accessing Grafana & Prometheus UI
– End-users interacting with Notes App UI/API
Relationships & interactions
• Node Exporter → exposes /metrics → scraped by Prometheus
• cAdvisor → exposes container metrics → scraped by Prometheus
• Notes App → application metrics endpoint → scraped by Prometheus
• Prometheus → stores time‐series data in prometheus_data volume
• Grafana → queries Prometheus API → renders dashboards → data persisted in grafana_data
• Users → HTTP → Grafana (3000), Prometheus (9090), Notes App UI (8000) / API
Architectural patterns
• Microservices style (monitoring stack + sample app each in its own container)
• Shared network for service discovery
• Persistent volumes for stateful services (Prometheus, Grafana)
• Single Docker Compose file as orchestration layer
• Full-stack sample app separation: React front-end vs Django back-end
Essential elements
• Component labels (e.g., “Prometheus (9090)”)
• Monitoring agents
• Data stores
• Application services
• Users/clients