Datadog data source for Grafana
The Datadog data source for Grafana allows you to query and visualize Datadog metrics from within Grafana.
The Datadog data source has the following requirements:
- Grafana Enterprise with a valid license. Refer to Activate an Enterprise license.
- Grafana user with a server or organization administrator role. Refer to Permissions.
- An active Datadog account.
- This data source does not support logs or traces from Datadog.
Install the data source plugin
To install the data source, refer to Installation.
For this plugin, there are no compatibility requirements.
Verify that the plugin is installed
- In Grafana Enterprise from the left-hand menu, navigate to Configuration > Data sources.
- From the top-right corner, click the Add data source button.
- Search for
Datadogin the search field, and hover over the Datadog search result.
- Click the Select button for Datadog.
- If you can click the Select button, then it is installed.
- If the button is missing or disabled, then the plugin is not installed. Check to see if your Grafana Enterprise license is valid, and reinstall the plugin. If you still need help, contact Grafana Labs.
Note: On Grafana Cloud, it can take up to 15 minutes to see the data source plugin within Grafana.
Get an API key and application key from Datadog
- Go to https://datadoghq.com.
- Set up an API key and copy your application key.
- Add the API key to the Datadog plugin:
- Navigate to Integration -> APIs.
- Enter a unique key name, and click Create API key.
Get your Application Key by navigate to Teams -> Application Key and copying the desired
Configure the data source
To add a new Datadog data source, refer to Add a data source, and fill in the following fields:
|Name||A name for this particular Datadog data source.|
|API URL||URL to the Datadog API. For example, |
|API Key||API key from Datadog.|
|APP Key||Application key from Datadog.|
|Cache Interval||Caching is used to limit the number of API calls. The default cache period is 60 seconds.|
|Cache Size||Caching is used to limit the size of API calls. The default cache size is 100 MB.|
|Show API rate limits||Show Datadog API limits for each queried endpoint. To view the API rate limits, go to the Query Inspector > JSON tab, and set Select source to |
|Disable Data links||Check this to disable data links. Data links are the links that takes user to the datadog app when they interact with panels|
|Enable Basic Auth||Use Basic authentication when calling the API URL. This is useful when using a proxy.|
Configure the data source with provisioning
Configure the Datadog data source using configuration files with Grafana’s provisioning system. To learn more about how the provisioning system works, including all of the data source settings, refer to Provisioning Grafana.
Here is a provisioning example for this data source:
- name: DATADOG type: grafana-datadog-datasource access: proxy basicAuth: false jsonData: url: https://api.datadoghq.com api_key: API Key app_key: Application Key cacheInterval: 60 cacheSize: 100 logApiRateLimits: false disableDataLinks: false
Query the data source
The query editor allows you to query Datadog, get monitor status, get service-level objectives (SLOs), perform arithmetic, and alias the graph’s legend.
Get metric queries by setting QueryType to
- Select the metric or click the query edit button to type your metric
- Select the aggregation type (default is average)
- Optionally select one or more tags if you want to filter results with
- Optionally select the functions dropdown to select a Datadog function. These can be reordered and removed by clicking on them and clicking the arrows or x
Service-level objectives (SLOs)
Get SLOs by setting Query type to
SLO. Select an objective from the list. The SLOs are populated from your Datadog account.
Use metric arithmetic by setting Query type to
- To perform an arithmetic operation, there must be at least one other query in the query editor.
- The supported arithmetic operations are
- To refer to a metric, use
#followed by the query’s name. For example,
#A * 2 doubles the result of query A.
#A / #B divides the results of query A by query B.
Aliasing the legend
You can use
Alias By and
Alias RegExp to change the text in the graph’s legend. For
Alias By, use plain text, scoped variables listed as follows, or both.
|Scoped variables for metics||Replaced with|
|$__expression||full metric expression|
|$__aggr||metric aggregation function (e.g. avg, max, min, sum)|
|$__scope||metric scope (e.g. region, site, env, host)|
|Scoped variables for (SLOs)||Replaced with|
|$__name||name (same as what is selected in the |
|$__aggr||aggregation function (e.g. |
|$__numerator||metric used as the numerator in the SLO calculation|
|$__denominator||metric used as the denominator in the SLO calculation|
To use regular-expression aliasing, fill out
Alias RegExp with a regular expressions to find matches that are separated by commas.
Display the monitors list and status information by setting Query type to
Monitor. Alerts in Grafana are referred to as monitors in Datadog. For more information, refer to Monitors.
The following options are available:
- Count by status, type, tags, or mute status
- Monitors list
Count by: Display the count of monitors by status, type, tag, or mute status.
Monitors list: List all of the monitors and their corresponding states and other related details.
Query: For the
Count by and
Monitors list options, you can optionally specify the filter query. If you specify the filter query, the count or list will return only the monitors that match the query.
For more information about monitor queries, refer to QUERY.
status:(alert OR ok OR "no data" OR warn)lists the monitors with at least one of status
no data, or
status:(alert OR warn) type:metric "cassandra"lists the metric monitors with
warnstatus and also related to "cassandra".
id:(7254197 OR 240232)displays only the status of monitors with ID
Note: For the Monitors list option, and due to API limits, only the top n monitors specified by the
items per pagesetting are retrieved and displayed.
All the monitor queries will have data links to the datadog application. To disable the data links, check
Disable Data links option in the config.
Templates and variables
To add a new Datadog query variable, refer to Add a query variable. Use your Datadog data source as your data source. The following queries are available:
|*||Fetches the list of available metrics|
|tag||Returns all |
|scope||Returns all |
|host||Returns all |
|device||Returns all |
|env||Returns all |
|region||Returns all |
|site||Returns all |
|status||Returns all |
|version||Returns all |
For custom tag groups, enter the tag group name. For example, if your custom tag group name is
subscription_name, then enter that in the Query field.
After you create a variable, you can it in your Datadog queries. For more information, refer to Variable syntax.
For more information about variables, refer Templates and variables.
Import a dashboard for Datadog
To import a dashboard, refer to Import a dashboard.
To find your imported dashboards, go to Configuration > Data sources.
To see the available pre-made dashboards, select the Datadog data source, and select the Dashboards tab.
Grafana Enterprise type of template variable called Ad-hoc filters, which applies to all the Datadog queries in a dashboard. This filter acts as sa quick filter. An ad-hoc variable for Datadog fetches all the key-value pairs from tags, such as
region:west, and uses them as query tags. To create this variable, select the Ad-hoc filters type and choose your Datadog data source. You can name this variable anything.
Installing Datadog on Grafana Cloud:
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
For more information, visit the docs on plugin installation.
Installing on a local Grafana:
For local instances, plugins are installed and updated via a simple CLI command. Plugins are not updated automatically, however you will be notified when updates are available right within your Grafana.
1. Install the Data Source
Use the grafana-cli tool to install Datadog from the commandline:
grafana-cli plugins install
The plugin will be installed into your grafana plugins directory; the default is /var/lib/grafana/plugins. More information on the cli tool.
Alternatively, you can manually download the .zip file for your architecture below and unpack it into your grafana plugins directory.
Alternatively, you can manually download the .zip file and unpack it into your grafana plugins directory.
2. Configure the Data Source
Accessed from the Grafana main menu, newly installed data sources can be added immediately within the Data Sources section.
Next, click the Add data source button in the upper right. The data source will be available for selection in the Type select box.
To see a list of installed data sources, click the Plugins item in the main menu. Both core data sources and installed data sources will appear.
[2.3.9] - 2021-09-14
- Docs update
[2.3.8] - 2021-09-13
- Docs update
[2.3.7] - 2021-08-26
- Added config option to disable monitor data links
[2.3.6] - 2021-07-29
- Fixed a bug where removing groupBy option removed other filters
- Fixed a bug where aliasBy was not setting a displayName for the value field
- Variable filtering performance improvements
[2.3.5] - 2021-7-22
- Docs update
[2.3.4] - 2021-5-26
- #250: Retain path suffix in settings URL
[2.3.3] - 2021-5-24
- #244: Support for
[2.3.2] - 2021-4-29
- #209: Update to v2 API for fetching all metric tags
[2.3.1] - 2021-4-12
- Chore: Update SDK
- #229: Monitor API
- #229: Default Dashboard: Monitors Explorer
- #214: Sort hosts by
namewhen looking for tag values
- #219: Show query error message
- #222: Fix panic when no hosts are returned
- #199: Fix cache settings unmarshal when changed through UI
- #197: Added support for Basic Auth credentials
- #199: Use a struct to unmarshal settings
- #191: Fix and enable e2e tests
- #164: Added tests for ad-hoc filters
- #166: Update annotations editor screenshot in README
- #176: SLO dropdown is not sorted or sortable
- #177: SLO dropdown typeahead search does not work
- #185: Annotations editor does not display the query
- #146: Support SLO History endpoint
- #150: AdHoc Filters not working
- #168: Update to new SDK to support individual plugin licensing
- #167: Add the ability to ALIAS BY without regex
- #166: Update plugin documentation
- #152: Metric name empty when editing query
- #159: From clause does not show all options
- #163: Duplicate values in ad-hoc filter drop-downs
- #166: Documentation page for the plugin is old
- #164: Can't remove an ad-hoc filter if the request fails
- Metric Select filtering
- Metric Select Paging and Server side filtering
- Add check for resource cache limit error and log warning
- Use map for static cache - client is hitting cache limit
[2.0.1] - 2020-08-19
- Query fails without aggregate selected
- Hitting cache limit causes call to fail, don't fail and return notice
- Add setting to adjust cache limit
[2.0.0] - 2020-08-13
- #103 Add backend datasource to support Alerting
- #108 Health check
- Caching to improve performance/reduce hiting rate limits
- #112 Metrics select - virtual scrolling for large lists
- #112 Metrics cache and manual refresh
- #111 Allow setting Datadog URL
- #109 Move credentials to secure json
- #105 typo in query editor
- #106 Selecting template variable crashes UI
[1.4.9] - 2020-05-05
- Conversion to react
- Support for alternate SaaS endpoints
[1.4.8] - 2020-04-10
- Add migration for regex
[1.4.7] - 2019-10-23
- Added regex match and alias by fields to raw query editor
- Changed default alias to something more useable, being the one returned from datadog.
[1.4.6] - 2019-09-09
- Add migration for regex
[1.4.5] - 2019-09-06
- Fix styles for functions in Query Editor
[1.4.4] - 2019-08-26
- Fix for Query Editor
- Updated packages
- Now uses toolkit
[1.4.3] - 2019-05-17
- Fixes for issue https://github.com/grafana/datadog-datasource/issues/62
- Fixes for issue https://github.com/grafana/datadog-datasource/issues/63
- Fixes for issue https://github.com/grafana/datadog-datasource/issues/65
- updated packages and jest configuration
[1.4.0] - 2019-02-15
- Caching for API queries. Limits calls to Datadog to 1 per minute per unique query
- Tags. Adds support for all tag groups and fixes a bug that limited the number of tag groups when using ad hoc queries.
[1.3.1] - 2019-01-14
- Error when adding new datasource (proxy error: unsupported protocol scheme) (#54)
- Metric editor broken if query type is not the one of 'arithmetic' or 'query'
[1.3.0] - 2019-01-10
- Support arithmetic (#31)
- Show all tags in ad-hoc filter (#52)
- Fix error while getting tags in ad-hoc filter (Error: this.request is not a function) (#50)
[1.2.0] - 2018-11-29
- Support template variable for annotations (#38)
- Invalid space aggregator error when no aggregation selected (#42)
[1.1.0] - 2018-10-04
- Metric arithmetic using a number (multiply a metric value by 100 for example) (#33)
- Adds three Datadog functions (#32):
- Arithmetic -> Log10 function
- Smoothing -> Auto Smoother
- Regression -> Trend Line
[1.1.0] - 2018-09-19
- Improved Legend Formatting - The Alias By field in the Query Editor now allows you to specify which part of the metric name you want to use. It also now supports regexp for full control over the legend item/alias format.
Pro tips for making the most of your Datadog metrics in Grafana with the enterprise plugin
Blog post 4 min
Visualize Humio logs alongside your other data sources in Grafana Cloud with the new plugin for Grafana
Blog post 5 min
Monitor your production line with the new Grafana Enterprise data source plugin for SAP HANA®
Blog post 5 min
What’s new in Grafana Enterprise Metrics 1.3, our scalable, self-hosted Prometheus service
Blog post 5 min
Introducing the new Open Distro for Elasticsearch plugin for Grafana, also available in Amazon Managed Service for Grafana
Blog post 3 min
Want to visualize software development insights with Grafana? With our new Jira Enterprise plugin, you can!
Blog post 5 min
A closer look at the admin API and plugin for centralized tenant administration and control in Grafana Enterprise Logs
Blog post 4 min
The new Splunk Infrastructure Monitoring plugin brings the SaaS formerly known as SignalFx to your Grafana dashboards
Blog post 5 min
The Splunk plugin for Grafana now supports data links for jumping directly from logs to traces
Blog post 5 min
With the new AWS IoT SiteWise plugin, you can visualize and monitor your equipment data in Grafana dashboards
Blog post 2 min