Datadog

Data SourcePREMIUM

Datadog datasource
Premium

Premium plugins, along with support and assistance from the core team behind Grafana, are available with Grafana Enterprise.

Please sign up or log in to get started.

Sign Up

Grafana Datadog Datasource Plugin

CircleCI

The Grafana Datadog Datasource allows you to visualize metrics from the Datadog monitoring service in Grafana.

Usage

Caching

For large dashboards, that make lots of queries it is possible to be rate limited by the Datadog API (reach the maximum number of API calls per hour that the Datadog API allows). The caching feature caches unique queries for 60 seconds. This interval can be changed to be longer or shorter on the config page.

Query Editor

query editor

It's easy - select aggregation and metric. If you want to filter result, select one or more tags.

The Datadog datasource supports all of the advanced functions that the Datadog query editor. Select it from dropdown and arrange by clicking function name.

Alias by field usage possibilities:

  • Type in the alias into the "Alias by" field.

  • Use scoped variables:

    • $__metric = replaced with metric name
    • $__display_name = replaced with metric name
    • $__expression = replaced with full metric expression
    • $__aggr = replaced with metric aggregation function (e.g. avg, max, min, sum)
    • $__scope = replaced with metric scope (e.g. region, site, env, host)

scoped_vars

  • Use regular expressions:

    • Type in your regular expression into "Alias RegExp" field in /you regexp here/flags format.

    • If "Alias by" field is empty, RegExp results will be joined using ,.<br> Example with metric expression = avg:system.load.5{*} :<br> "Alias by" field input: ""<br> "Alias RegExp" field input: /avg:(.+)\\.(\\d)/<br> Result: system.load, 5<br>

    • Use $<group_number> variables in "Alias by" field.<br> Example with metric expression = avg:system.load.5{*} :<br> "Alias by" field input: $1: $2 seconds<br> "Alias RegExp" field input: /avg:(.+)\\.(\\d)/<br> Result: system.load: 5 seconds<br>

    • Use $0 to get the whole expression.<br> Example with metric expression = datadog.dogstatsd.packet.count{*} :<br> "Alias by" field input: Expression: $0<br> "Alias RegExp" field input: /DOGstatsd\\.(.*)\\.(.*){\\*}/i<br> Result: Expression: datadog.dogstatsd.packet.count{*}<br>

    Note: you'll get an error using nonexistent group number.

regexp

Metric arithmetic

To use metric arithmetic set Query type to Arithmetic. Link to desired metric by using # sign. For example, #A * 2 will double the result of query A. Arithmetic between two metrics works in the same way - add queries which results you want to use for the calculation and then link to these metrics in the third query, like #A / #B.

Annotations

annotations editor

An annotation is an event that is overlaid on top of graphs - an example of an event is a deployment or an outage. With this datasource, you can fetch events from Datadog and overlay them on graphs in Grafana. Annotations events can be filtered by source, tag or priority.

Templating

There are a few options for getting values of template variable - metrics and tags. To fetch the list of available metrics specify * in the Query field.

To return all tags use the value: tag or scope.

To return tags for a specified tag group then use one of the following default category values:

  • host
  • device
  • env
  • region
  • site
  • status
  • version

For custom tag groups, then just enter the tag group name e.g. if your custom tag group name is subscription_name then enter that in the Query field.

Filter results by using the Regex field. Multi-value variables are supported when using tags - multiple selected tag values will be converted into a comma separated list of tags.

Ad-hoc filters

There is a new special type of template variable in Grafana called Ad-hoc filters. This variable will apply to all the Datadog queries in a dashboard. This allows using it like a quick filter. An ad-hoc variable for Datadog fetches all the key-value pairs from tags, for example, region:east, region:west, and uses them as query tags. To create this variable, select the Ad-hoc filters type and choose your Datadog datasource. You can set any name for this variable.

Install Plugin

Version

Dependencies:
  • Grafana 3.x.x