A tool for deploying and managing DataDog health checks using configuration as code
Project description
datadog-healthcheck-deployer
versions
health
stats
A powerful Infrastructure-as-Code (IaC) tool for deploying and managing DataDog health checks, synthetic tests, and SLOs
Installation
pip install datadog-healthcheck-deployer
Quick Start
- Set up your DataDog credentials:
export DD_API_KEY="your-api-key"
export DD_APP_KEY="your-app-key"
- Create a health check configuration file
healthcheck.yaml:
version: "1.0"
healthchecks:
- name: "Basic HTTP Check"
type: "http"
url: "https://api.example.com/health"
monitors:
availability:
enabled: true
threshold: 99.9
- Deploy your health check:
dd-healthcheck deploy --file healthcheck.yaml
Usage
CLI Commands
# Deploy health checks
dd-healthcheck deploy --file <config-file>
# Validate configuration
dd-healthcheck validate --file <config-file>
# List existing health checks
dd-healthcheck list
# Delete health checks
dd-healthcheck delete --name <check-name>
Configuration Reference
See our Configuration Guide for detailed configuration options.
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.
Objective
Integrate with our existing monitor and dashboard deployers primarily for health check endpoint monitoring.
- Health check endpoint monitoring
- Synthetic API tests
- Uptime monitoring
- SSL certificate monitoring
- DNS monitoring
- Global availability checks
Project Structure
datadog-healthcheck-deployer/
├── examples
│ └── dashboards
│ ├── aws
│ ├── common
│ └── services
├── scripts
├── src
│ ├── datadog_healthcheck_deployer
│ │ ├── checks
│ │ ├── dashboards
│ │ ├── monitors
│ │ ├── utils
│ │ └── validators
└── tests
└── unit
├── checks
├── dashboards
├── monitors
├── utils
└── validators
Configuration Examples
Health Check Configuration
healthchecks:
- name: "API Health Check"
type: "http"
url: "https://api.example.com/health"
locations:
- "aws:us-east-1"
- "aws:eu-west-1"
- "gcp:asia-east1"
frequency: 60 # seconds
timeout: 10
success_criteria:
- status_code: 200
- response_time: 1000 # ms
headers:
X-API-Key: "{{API_KEY}}"
monitors:
availability:
enabled: true
threshold: 99.9
latency:
enabled: true
threshold: 500
slo:
target: 99.95
window: "30d"
Integration Example
from datadog_monitor_deployer.deployer import MonitorDeployer
from datadog_healthcheck_deployer.checks import HttpCheck
from datadog_healthcheck_deployer.slos import AvailabilitySLO
class HealthCheckDeployer:
def __init__(self, api_key: str, app_key: str):
self.monitor_deployer = MonitorDeployer(api_key, app_key)
def deploy_health_check(self, config: dict):
# Create the health check
check = HttpCheck.from_config(config)
check_id = check.create()
# Create associated monitors
monitors = self._create_monitors(check, config)
# Create SLO if configured
if 'slo' in config:
slo = AvailabilitySLO(
name=f"{config['name']} Availability",
target=config['slo']['target'],
monitors=monitors
)
slo.create()
Synthetic Test Configuration
synthetic_tests:
- name: "Global API Availability"
type: "api"
request:
method: "GET"
url: "https://api.example.com/health"
assertions:
- type: "statusCode"
operator: "is"
target: 200
- type: "responseTime"
operator: "lessThan"
target: 1000
locations:
- "aws:us-east-1"
- "aws:eu-west-1"
- "aws:ap-southeast-1"
- "gcp:us-central1"
- "azure:westeurope"
frequency: 300
retry:
count: 2
interval: 30
Future Features
- Multi-step API checks
- Custom assertion logic
- Response body validation
- SSL certificate expiration monitoring
- DNS propagation checks
- Global latency mapping
- Automatic baseline creation
- Anomaly detection
- Integration with incident management systems
Benefits
The goal is to provide similar capabilities to Catchpoint while keeping everything within the DataDog ecosystem, which:
- Reduces costs
- Simplifies management
- Provides better integration with existing monitoring
- Enables unified alerting and reporting
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datadog_healthcheck_deployer-0.1.0.tar.gz.
File metadata
- Download URL: datadog_healthcheck_deployer-0.1.0.tar.gz
- Upload date:
- Size: 35.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
366be9d1da9aab19d09ace6aa14ed391144b682a8975ef7ada01fbba135dc5d0
|
|
| MD5 |
49b3f9c4aaeee8951f0ef724f7f79eba
|
|
| BLAKE2b-256 |
7d6c04b9f63b382bfe30f7cc2c6c7ec86ed4f704511c2f06afefffc8236ab91a
|
Provenance
The following attestation bundles were made for datadog_healthcheck_deployer-0.1.0.tar.gz:
Publisher:
workflow.yml on fleXRPL/datadog-healthcheck-deployer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datadog_healthcheck_deployer-0.1.0.tar.gz -
Subject digest:
366be9d1da9aab19d09ace6aa14ed391144b682a8975ef7ada01fbba135dc5d0 - Sigstore transparency entry: 180035627
- Sigstore integration time:
-
Permalink:
fleXRPL/datadog-healthcheck-deployer@33fb79f7c1c49d19249f513762291db12e06032e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/fleXRPL
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@33fb79f7c1c49d19249f513762291db12e06032e -
Trigger Event:
push
-
Statement type:
File details
Details for the file datadog_healthcheck_deployer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: datadog_healthcheck_deployer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 46.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5babe5761c1ea9fe1f481683f1fc949960bb65078b056f2be823aa3cda98a4d0
|
|
| MD5 |
153b7b9a804f889d6848f3a150a8be61
|
|
| BLAKE2b-256 |
68b91503201f234d0e4e97db056cb8c837220314822a4470da6126f9040be1a6
|
Provenance
The following attestation bundles were made for datadog_healthcheck_deployer-0.1.0-py3-none-any.whl:
Publisher:
workflow.yml on fleXRPL/datadog-healthcheck-deployer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datadog_healthcheck_deployer-0.1.0-py3-none-any.whl -
Subject digest:
5babe5761c1ea9fe1f481683f1fc949960bb65078b056f2be823aa3cda98a4d0 - Sigstore transparency entry: 180035628
- Sigstore integration time:
-
Permalink:
fleXRPL/datadog-healthcheck-deployer@33fb79f7c1c49d19249f513762291db12e06032e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/fleXRPL
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@33fb79f7c1c49d19249f513762291db12e06032e -
Trigger Event:
push
-
Statement type: