இரவு 3 மணிக்கு Container Crash — இனி தூக்கம் கெடாது!
இது familiar-ஆ இருக்கும் — Flask API, Postgres database, Nginx, Redis cache — ஐந்து containers ஒரு ₹1,500/மாதம் VPS-ல் run பண்றீர்கள். மாதத்தில் ஒரு தடவை ஒன்று crash ஆகும். இரவில் நடந்தால் — phone alert, SSH login, logs dig, error Google, container restart — 20 minutes போகும். அடுத்த வாரம் again.
இந்த cycle-ஐ break பண்ண ஒரு solution build பண்ணலாம்: Container Doctor — Python AI agent. இது Docker containers-ஐ real-time-ல் monitor பண்ணும், errors detect ஆனால் Claude AI-க்கு logs அனுப்பி diagnosis பெறும், automatic restart பண்ணும் அல்லது Slack-ல் exactly என்ன problem என்ன செய்யணும்னு alert அனுப்பும்.
Total cost? மாதம் ₹50–100 Claude API calls மட்டும்.
Architecture — எப்படி வேலை செய்கிறது?
| Component | வேலை | File |
|---|---|---|
| Monitor | Docker API வழியாக containers-ஐ watch பண்றது | monitor.py |
| Diagnosis | Claude AI-க்கு logs அனுப்பி analysis வாங்குது | diagnosis.py |
| Actions | Restart, Slack alert, notification | actions.py |
| Config | API keys, settings | .env |
Project Structure
container-doctor/
├── monitor.py # Main monitoring loop
├── diagnosis.py # Claude AI diagnosis engine
├── actions.py # Auto-restart + Slack alerts
├── requirements.txt # Python dependencies
├── Dockerfile # Containerize the monitor
├── docker-compose.yml # Deploy with your services
└── .env # API keys and config
Step 1: Dependencies Install பண்றது
pip install docker anthropic slack-sdk python-dotenv
requirements.txt file:
Premium Content
Full Python source code, Claude AI prompt engineering, Docker Compose setup, Slack alerts integration, and cost breakdown inside — copy-paste ready for your own server.
You've used 3 of 3 free articles today.
Subscribe NowAlready subscribed? Sign in




கருத்துகள் (0)
Be the first to comment!