A framework for deploying DataDog dashboards as code
Project description
DataDog Dashboard Deployer
A powerful framework for deploying DataDog dashboards as code using CI/CD pipelines. Define, version, and automate your DataDog dashboard deployments using YAML configurations.
versions
health
stats
Features
- ๐ Configuration as Code: Define dashboards using YAML configuration files
- ๐ Automated Deployment: Deploy dashboards automatically via GitHub Actions
- ๐ Rich Widget Support: Support for timeseries, query values, heatmaps, and more
- ๐ Secure Credentials: Handle DataDog API credentials securely
- ๐จ Templating Support: Create dynamic dashboards using Jinja2 templating
- ๐ Extensible Architecture: Easy to extend and customize
Quick Start
Installation
pip install datadog-dashboard-deployer
Basic Usage
- Set up your DataDog credentials:
export DATADOG_API_KEY='your-api-key'
export DATADOG_APP_KEY='your-application-key'
- Create a dashboard configuration:
# config/dashboard_config.yaml
version: "1.0"
dashboards:
- name: "System Overview"
description: "System performance metrics"
widgets:
- title: "CPU Usage"
type: "timeseries"
query: "avg:system.cpu.user{*}"
- title: "Memory Usage"
type: "timeseries"
query: "avg:system.mem.used{*}"
- Deploy your dashboard:
datadog-dashboard-deploy config/dashboard_config.yaml
Project Structure
datadog-dashboard-deployer/
โโโ src/
โ โโโ datadog_dashboard_deployer/
โ โโโ __init__.py
โ โโโ core.py # Core logic for dashboard creation
โ โโโ config.py # Configuration handling
โ โโโ utils.py # Utility functions
โโโ config/
โ โโโ dashboard_config.yaml # Main dashboard configuration
โโโ .github/
โ โโโ workflows/
โ โโโ deploy.yml # GitHub Actions workflow
โโโ tests/ # Test suite
โโโ docs/ # Documentation
โโโ requirements.txt # Project dependencies
โโโ setup.py # Package configuration
โโโ README.md
Documentation
GitHub Actions Integration
-
Add DataDog credentials as secrets:
- Go to repository Settings > Secrets and Variables > Actions
- Add
DATADOG_API_KEYandDATADOG_APP_KEY
-
Create a workflow file:
# .github/workflows/deploy.yml
name: Deploy Dashboards
on:
push:
branches: [main]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Deploy dashboards
env:
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
DATADOG_APP_KEY: ${{ secrets.DATADOG_APP_KEY }}
run: |
pip install datadog-dashboard-deployer
datadog-dashboard-deploy config/dashboard_config.yaml
Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup
- Clone the repository:
git clone https://github.com/fleXRPL/datadog-dashboard-deployer.git
cd datadog-dashboard-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
Security
- API keys are stored securely as environment variables or GitHub secrets
- Regular security audits and dependency updates
- See our Security Policy for details
Support
- GitHub Issues for bug reports and feature requests
- GitHub Discussions for questions and community support
- Stack Overflow using the
datadog-dashboard-deployertag
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- DataDog for their excellent monitoring platform
- datadogpy for the official Python client
- All our contributors
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_dashboard_deployer-0.1.0.tar.gz.
File metadata
- Download URL: datadog_dashboard_deployer-0.1.0.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
381dae1150a435b1d8dbe519e931b2f01dfe4860c565d09d8ffde618887f4d55
|
|
| MD5 |
afc704c37bcc86f5ae122ed99bbfe228
|
|
| BLAKE2b-256 |
f4aa627561099fdb4c7bfb15fc2c303c13d0c503349191d66bdd27ccdd0d683d
|
Provenance
The following attestation bundles were made for datadog_dashboard_deployer-0.1.0.tar.gz:
Publisher:
workflow.yml on fleXRPL/datadog-dashboard-deployer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datadog_dashboard_deployer-0.1.0.tar.gz -
Subject digest:
381dae1150a435b1d8dbe519e931b2f01dfe4860c565d09d8ffde618887f4d55 - Sigstore transparency entry: 170117461
- Sigstore integration time:
-
Permalink:
fleXRPL/datadog-dashboard-deployer@fa795c2753c2287b40fb65011e4c5c351db35383 -
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@fa795c2753c2287b40fb65011e4c5c351db35383 -
Trigger Event:
push
-
Statement type:
File details
Details for the file datadog_dashboard_deployer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: datadog_dashboard_deployer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c59f58901d8dfa9c1817ed6dd39a3bbee5945f55c6b1eb2060244e90b70e7b0
|
|
| MD5 |
c1d7fd0a7722cc7f191fe2ccfa204038
|
|
| BLAKE2b-256 |
7d68f4386e68cec6417898b19db247c62f217bb7f2dc9af246c4cc680d61e5db
|
Provenance
The following attestation bundles were made for datadog_dashboard_deployer-0.1.0-py3-none-any.whl:
Publisher:
workflow.yml on fleXRPL/datadog-dashboard-deployer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datadog_dashboard_deployer-0.1.0-py3-none-any.whl -
Subject digest:
1c59f58901d8dfa9c1817ed6dd39a3bbee5945f55c6b1eb2060244e90b70e7b0 - Sigstore transparency entry: 170117463
- Sigstore integration time:
-
Permalink:
fleXRPL/datadog-dashboard-deployer@fa795c2753c2287b40fb65011e4c5c351db35383 -
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@fa795c2753c2287b40fb65011e4c5c351db35383 -
Trigger Event:
push
-
Statement type: