A powerful and flexible tool for managing Datadog monitors as code. This project enables teams to define, deploy, and manage Datadog monitors using a declarative approach, supporting both YAML/JSON configurations and Python classes.
- 📝 Multiple Definition Formats:
- YAML/JSON with schema validation
- Python classes for programmatic creation
- Hybrid approach supporting both methods
- 🔍 Comprehensive Monitor Type Support:
- Metric monitors
- Event monitors
- Log monitors
- APM monitors
- Network monitors
- Process monitors
- ⚡ Advanced Functionality:
- Robust alerting configuration
- Multiple notification channels (Email, Slack, PagerDuty)
- Custom message templates
- Tagging and organization
- Full CRUD operations
- 🛡️ Enterprise-Ready:
- Idempotent operations
- Comprehensive testing
- Secure authentication handling
- CI/CD pipeline integration
- Install the package:
pip install datadog-monitor-deployer
- Set up your Datadog credentials:
export DD_API_KEY="your-api-key"
export DD_APP_KEY="your-app-key"
- Create a monitor definition (example.yaml):
monitors:
- name: "High CPU Usage Alert"
type: "metric alert"
query: "avg(last_5m):avg:system.cpu.user{*} > 80"
message: "CPU usage is above 80%"
tags:
- "env:production"
- "service:web"
options:
notify_no_data: true
evaluation_delay: 900
- Deploy your monitor:
dd-monitor deploy example.yaml
For detailed documentation, visit our Documentation Site.
- Clone the repository:
git clone https://github.com/fleXRPL/datadog-monitor-deployer.git
cd datadog-monitor-deployer
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: .\venv\Scripts\activate
- Install development dependencies:
pip install -r requirements-dev.txt
- Run tests:
pytest
We welcome contributions! Please see our Contributing Guide for details.
This project is licensed under the MIT License - see the LICENSE file for details.
Please review our Security Policy for reporting security vulnerabilities.
This project is actively maintained and used in production environments. For the latest updates, see our Changelog.
Built with ❤️ by the fleXRPL team