Skip to main content

datadog-healthcheck-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 Infrastructure-as-Code (IaC) tool for deploying and managing DataDog health checks, synthetic tests, and SLOs

Installation

pip install datadog-healthcheck-deployer

Quick Start

  1. Set up your DataDog credentials:
export DD_API_KEY="your-api-key"
export DD_APP_KEY="your-app-key"
  1. 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
  1. 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

Metadata

Release files for datadog-healthcheck-deployer 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for datadog-healthcheck-deployer 0.1.0
File Size Uploaded Provenance Actions
datadog_healthcheck_deployer-0.1.0.tar.gz 35.5 kB With provenance Details for datadog_healthcheck_deployer-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for datadog-healthcheck-deployer 0.1.0
File Interpreter ABI Platform Actions
datadog_healthcheck_deployer-0.1.0-py3-none-any.whl Python 3 none any Details for datadog_healthcheck_deployer-0.1.0-py3-none-any.whl

Total release size: 82.0 kB

Release files / datadog_healthcheck_deployer-0.1.0.tar.gz

Download URL datadog_healthcheck_deployer-0.1.0.tar.gz
Size 35.5 kB
Tags Source
SHA-256 checksum
How to use checksums
366be9d1da9aab19d09ace6aa14ed391144b682a8975ef7ada01fbba135dc5d0
BLAKE2b-256 checksum
How to use checksums
7d6c04b9f63b382bfe30f7cc2c6c7ec86ed4f704511c2f06afefffc8236ab91a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 11, 2025.

Transparency log

Release files / datadog_healthcheck_deployer-0.1.0-py3-none-any.whl

Download URL datadog_healthcheck_deployer-0.1.0-py3-none-any.whl
Size 46.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5babe5761c1ea9fe1f481683f1fc949960bb65078b056f2be823aa3cda98a4d0
BLAKE2b-256 checksum
How to use checksums
68b91503201f234d0e4e97db056cb8c837220314822a4470da6126f9040be1a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 11, 2025.

Transparency log

Security for datadog-healthcheck-deployer 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for datadog_healthcheck_deployer-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 11, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page