Skip to content

fleXRPL/datadog-monitor-deployer

Repository files navigation

Datadog Monitor Deployer

versions

PyPI version Python Versions CI/CD Pipeline Python

health

Quality Gate Status Overall Coverage Security Rating Maintainability Rating Vulnerabilities Dependabot Status Code style: black

stats

Downloads License: MIT

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.

🌟 Key Features

  • 📝 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

🚀 Quick Start

  1. Install the package:
pip install datadog-monitor-deployer
  1. Set up your Datadog credentials:
export DD_API_KEY="your-api-key"
export DD_APP_KEY="your-app-key"
  1. 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
  1. Deploy your monitor:
dd-monitor deploy example.yaml

📚 Documentation

For detailed documentation, visit our Documentation Site.

🛠️ Development Setup

  1. Clone the repository:
git clone https://github.com/fleXRPL/datadog-monitor-deployer.git
cd datadog-monitor-deployer
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: .\venv\Scripts\activate
  1. Install development dependencies:
pip install -r requirements-dev.txt
  1. Run tests:
pytest

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🔒 Security

Please review our Security Policy for reporting security vulnerabilities.

📊 Project Status

This project is actively maintained and used in production environments. For the latest updates, see our Changelog.


Built with ❤️ by the fleXRPL team