Datadog datasource

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

Upgrade Now

Grafana Datadog Datasource Plugin


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



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. query editor

Service Level Objectives

Alias by field usage possibilities:

  • Type in the alias into the "Alias by" field.
  • Use scoped variables:
  • Metrics
    • $__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)
  • SLOs (Service Level Objectives)
    • $__name = Replaced with the name (same as what is selected in the Objective dropdown)
      • $__aggr = Replaced with the aggregation
      • $__metric = Replaced with the metric name
      • $__scope = Replaced with the scope
    • $__numerator = Replaced with the metric used as the numerator in the SLO calculation
    • $__denominator = Replaced with the metric used as the denominator in the SLO calculation


  • 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.


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 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.


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.

Sign up Now


  • Grafana 7.0.x