CloudMate is a modular Telegram bot that empowers DevOps engineers to monitor cloud services, trigger CI/CD pipelines, and receive infrastructure alerts directly in Telegram. Built with Python and powered by python-telegram-bot
, it integrates with AWS, GitHub, and Prometheus.
/start
– Greets the user and explains bot capabilities./status
– Check the health of endpoints./trigger <owner/repo> <workflow_id>
– Trigger GitHub Actions workflow.- Prometheus Webhook Receiver – Forwards alerts to Telegram.
- Python 3.10+
- python-telegram-bot
- aiohttp
- python-dotenv
- GitHub REST API
- Prometheus AlertManager
git clone https://github.com/yourusername/cloudmate.git
cd cloudmate
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
TELEGRAM_TOKEN=your-telegram-bot-token
TELEGRAM_CHAT_ID=your-chat-id
GITHUB_TOKEN=your-github-token
PROMETHEUS_SECRET=your-secret
Send alerts to:
POST http://<your-server>:5001/alerts?secret=your-secret
Use this in your Prometheus Alertmanager config:
receivers:
- name: 'telegram'
webhook_configs:
- url: 'http://your-server:5001/alerts?secret=your-secret'
🧪 Example Commands
/status https://google.com https://example.com
/trigger youruser/yourrepo your_workflow.yml
Made with Python.