Skip to main content

Datadog automation tool

Project description

Datadog library and command line tools

Latest PyPI package version libddog tests

libddog lets you define your metrics and dashboards in code and get the full benefit of a programming language to automate your monitoring setup.

First you write the query:

query = (Query("aws.elb.request_count")
        .filter(region="us-east-1")
        .agg("sum").by("availability-zone").as_count()
        .rollup("sum", 5 * 60))

# produces:
#   sum:aws.elb.request_count{region:us-east-1}
#    by {availability-zone}.as_count().rollup(sum, 300)

The query language closely resembles the Datadog syntax, but because it's Python code and not just a string it is validated and known to be well formed at definition time.

Then you define what the graph looks like:

Timeseries(
    title="ELB: total requests by AZ every 5min",
    requests=[
        Request(
            queries=[query],
            display_type=DisplayType.BARS,
        ),
    ],
    size=Size(height=3, width=5),
)

This gives you the widget you want, with all the parameters supported by the Datadog UI.

Learn more in the User guide.

The state of the project

libddog is a young project and currently supports a small but useful subset of dashboard functionality. See the Feature support page for details.

We plan to support more dashboard features over time. We also plan to support monitors.

Want to know what's new in the project? Read the CHANGELOG.

Want to contribute? Start by reading the Maintainer guide.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

libddog-0.1.8.post1.tar.gz (104.8 kB view hashes)

Uploaded Source

Built Distribution

libddog-0.1.8.post1-py3-none-any.whl (60.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page