A modular DevOps project that simulates a lightweight self-healing infrastructure platform capable of monitoring system resources, processes, networks, logs, and Docker containers while automatically recovering failed services and maintaining incident reports.
The project is built entirely on Ubuntu using Python and Docker to demonstrate practical DevOps concepts including Linux administration, monitoring, automation, containerization, incident management, and infrastructure reliability.
- Learn Linux and DevOps fundamentals through hands-on implementation
- Build a monitoring platform from scratch without relying on third-party monitoring software
- Understand infrastructure automation and self-healing systems
- Gain practical experience with Docker-based environments
- Develop production-oriented Python programming skills
- Showcase real DevOps engineering practices in a portfolio project
- CPU usage monitoring
- Memory utilization monitoring
- Disk usage monitoring
- Live system statistics using
psutil
Monitors important system processes such as:
- SSH
- Docker
- Python
- Chrome
Capabilities:
- Detect running processes
- Report process availability
- Verify essential services
Performs infrastructure connectivity checks including:
- Internet connectivity verification
- DNS resolution
- Host availability checks
- IP address resolution
Monitored hosts include:
- GitHub
Parses application logs to detect:
- Errors
- Warnings
Capabilities:
- Log parsing
- Error counting
- Warning counting
- Automatic report generation
Generated report:
reports/log_report.txt
Creates a small production-like environment consisting of:
- Flask Application Container
- Nginx Container
- Redis Container
Capabilities:
- Build Docker images
- Deploy containers
- Monitor container status
Automatically discovers active containers and reports:
- Running containers
- Missing containers
- Infrastructure status
Detects stopped containers and performs automatic recovery.
Current workflow:
Container Failure
│
▼
Failure Detection
│
▼
Automatic Restart
│
▼
Recovery Verification
│
▼
Incident Report Generation
Every recovery attempt is recorded in:
reports/incidents.txt
Each record contains:
- Timestamp
- Failed container
- Recovery status
The project has been refactored into a modular architecture for better scalability and maintainability.
self-healing-platform/
├── src/
│ ├── monitoring/
│ ├── recovery/
│ ├── alerts/
│ ├── config/
│ └── utils/
│
├── docker/
├── logs/
├── reports/
├── tests/
├── docs/
├── scripts/
│
├── main.py
├── README.md
├── requirements.txt
└── .gitignore
- Python 3
- Ubuntu Linux
- Docker
- Git
- GitHub
- Bash
- systemctl
- ps
- htop
- ping
- netstat
- ss
- grep
- tail
- tree
- psutil
- subprocess
- pathlib
- socket
- datetime
- Linux Administration
- Process Monitoring
- Infrastructure Monitoring
- Network Monitoring
- Log Analysis
- Incident Management
- Self-Healing Systems
- Container Monitoring
- Docker Operations
- Infrastructure Automation
- Python Automation
- Modular Project Architecture
Ubuntu Host
│
▼
Monitoring Modules
┌──────────┬──────────┬──────────┐
│ │ │ │
System Process Network Logs
Monitor Monitor Monitor Parser
│ │ │ │
└──────────┴──────────┴──────────┘
│
▼
Docker Infrastructure
│
▼
Self-Healing Recovery Engine
│
┌───────────┴───────────┐
│ │
▼ ▼
Incident Reports Alert Module
Clone the repository
git clone <repository-url>
cd self-healing-platformCreate virtual environment
python3 -m venv venv
source venv/bin/activateInstall dependencies
pip install -r requirements.txtRun the complete platform
python main.py===== SELF-HEALING PLATFORM =====
Running src.monitoring.monitor
CPU Usage: 18%
RAM Usage: 24%
Disk Usage: 12%
Running src.monitoring.process_checker
docker: RUNNING
ssh: RUNNING
Running src.monitoring.network_checker
google.com
DNS: OK
github.com
DNS: OK
Running src.monitoring.log_parser
Total Errors: 2
Total Warnings: 2
Running src.recovery.auto_recovery
Checking: nginx-demo
Status: RUNNING
===== ALL MODULES EXECUTED =====
Planned enhancements include:
- Web dashboard for infrastructure visualization
- Real-time metrics monitoring
- Email and Telegram alerts
- YAML-based configuration management
- CI/CD pipeline using GitHub Actions
- Systemd service integration
- Kubernetes deployment
- Prometheus integration
- Grafana dashboard
- REST API for infrastructure management
- Health check endpoints
- Multi-node monitoring
- Role-based authentication
- Database-backed incident history
- Unit and integration tests
Through this project, I gained practical experience in:
- Python scripting for DevOps
- Linux system administration
- Bash command-line utilities
- Docker container management
- Infrastructure monitoring
- Process management
- Network diagnostics
- Log parsing
- Automation
- Self-healing infrastructure design
- Git and GitHub workflows
- Modular software architecture
Current Stage: Active Development
The project is under continuous development with new DevOps features and production-grade improvements being added incrementally.