Skip to main content

A simple command line utility to deploy datadog monitors from code.

dump

datadog-deployer dump

dumps the current datadog monitor definitions to the filename

Options:
--account TEXT

name of the Datadog account.

--filename PATH

to dump the monitors to.

--help

Show this message and exit.

deploy

datadog-deployer deploy

Deploys the datadog monitor definitions from filename. Compares the monitors with the deployed monitors and determines for each monitor whether to insert or update. Monitors defined in datadog which are not in defined in the file are left, unless –force-delete is specified.

Options:
--account TEXT

name of the Datadog account.

--filename PATH

to deploy monitors from.

--verbose

showing change details that are applied.

--dry-run

only show changes that would be applied.

--force-delete

monitors in datadog not defined in the file.

--help

Show this message and exit.

Example

Dump the current monitor definitions:

$ datadog-deployer dump --filename dd-monitors.yaml

Update the monitor definitions:

$ datadog-deployer deploy --filename dd-monitors.yaml
INFO: 5 inserts, 1 updates, 2 unmanaged and 33 unchanged.
INFO: "VPN connectivity" not defined in file. use --force-delete to delete.
INFO: "Invalid objects in Oracle" not defined in file. use --force-delete to delete.

If you want to delete unmanaged monitors, type:

$ datadog-deployer deploy --filename dd-monitors.yaml --force-delete
INFO: 0 inserts, 0 updates, 2 deletes and 39 unchanged.

File formats The file ~/.datadog.ini is a Python configuration file from which the Datadog connection parameters are read. At least it will need the api_key and api_app attributes in the section DEFAULT:

[DEFAULT]
api_key=a77aaaaaaaaaaaaaaaaaaaaa
app_key=bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb

Other attributes you can add are: proxies, api_host, statsd_host, statsd_port, statsd_socket_path, cacert, mute

Metadata

Release files for datadog-deployer 0.4.0

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

Built distribution (wheel)

Table of built distributions (wheels) for datadog-deployer 0.4.0
File Interpreter ABI Platform
datadog_deployer-0.4.0-py3-none-any.whl Python 3 none any Details

Release files / datadog_deployer-0.4.0-py3-none-any.whl

Download URL datadog_deployer-0.4.0-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2b787f45f79d4adc2fc445cc66200d36a405c59ce74642a3a06413e23cd9e013
BLAKE2b-256 checksum
How to use checksums
9bd3bf43b98ce13ba7401c6cbacb63b3cff4a44baabdc80a5aa5a840ceef44cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

0.4.0 This release

1 release file

0.3.0

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.0

1 release file

0.0.0

1 release file

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