Datadog
Last updated
Last updated
is an application performance monitoring platform that provides real-time observability into entities, servers, databases, and tools, providing developers with a comprehensive understanding of their infrastructure as well as the ability to identify areas for improvement.
Cortex is uniquely equipped to augment Datadog's tools, providing greater visibility into your entities. In this guide, you'll learn how to set up the Datadog integration to pull in services and metrics for entities:
Monitors
SLOs
Dependencies
Before getting started, make sure you have created the following:
You can create this in Datadog under Organizational Settings > Applications Key.
You can create this in Datadog under Organizational Settings > API Key.
In Cortex, click your avatar in the lower left corner, then click Settings.
Under "Integrations", click Datadog.
Click Add configuration.
Configure the Datadog integration form:
Account alias: Enter a name that Cortex will associate this configuration with.
App key: Enter the application key you generated in Datadog.
This key appears under the Key column in Datadog while viewing your list of Application Keys.
API key: Enter the API key you generated in Datadog.
Custom subdomain: Enter the custom subdomain for your Datadog instance.
This field only takes the subdomain, not the entire URL. For example, this field would take cortex-docs
from https://cortex-docs.datadoghq.com
.
Environments: Optionally, enter environment tags for Datadog entities.
Click Save.
Once you save your configuration, you'll see it listed on the integration's settings page in Cortex. If you’ve set everything up correctly, you’ll see the option to Remove Integration in Settings.
You can also use the Test all configurations button to confirm that the configuration was successful. If your configuration is valid, you’ll see a banner that says “Configuration is valid. If you see issues, please see documentation or reach out to Cortex support.”
The Datadog integration has multi-account support. You can add a configuration for each additional by repeating the process above.
Each configuration requires an alias, which Cortex uses to correlate the designated with registrations for various entities. Registrations can also use a default configuration without a listed alias. You can edit aliases and default configurations from the Datadog page in your Cortex settings. Select the edit icon next to a given configuration and toggle Set as default on. If you only have one configuration, it will automatically be set as the default.How to connect Cortex entities to Datadog
If your Datadog tag don’t cleanly match the Cortex entity tag, you can override this in the Cortex entity descriptor.
tag
Tag for the project in Datadog
✓
value
Value for the project; Cortex will find monitors and SLOs by querying tag:value OR tag:value2 ...
✓
alias
Alias for the configuration in Cortex (only needed if you have opted into multi-account support)
These tags are used to "discover" your monitors and SLOs. Cortex will find monitors and SLOs by querying tag:value OR tag:value2 ...
If you want to hard code and/or override discovery, you can define a monitors or SLOs block in the entity descriptor.
Monitors and SLOs
The ID of a monitor is found in the URL when you click on a monitor in your Datadog dashboard i.e., https://app.datadoghq.com/monitors/****
.
The ID for the SLO can be found in the URL when you click on an SLO in the Datadog dashboard. For example, https://app.datadoghq.com/slo?slo_id=****&timeframe=7d&tab=status_and_history
.
Monitors and SLOs have the same field definitions.
id
Datadog ID for the monitor or SLO
✓
alias
Alias for the configuration in Cortex (only needed if you have opted into multi-account support)
If you have two entities - for example, entity-one
and entity-two
- that have a dependency edge in Datadog's Service Map, both entities should exist in Cortex with the same entity identifiers.
If the entity tag in Cortex does not exactly match the entity identifier in Datadog, the dependencies will not automatically sync. You can override automatic discovery by defining values in the entity descriptor.
With the Datadog integration, you'll be able to find monitors and SLOs on an entity's home page. High-level information about monitors and SLOs appears in the Overview tab.
Click Monitoring in the entity's sidebar to see more detailed data about both monitors and SLOS. Both sections display tags for Pass, Fail, Warning, and No Data for each monitor or SLO.
The SLOs column shows each SLO, its target(s), the current value for that entity, and its status.
The Monitors column shows the title for each monitor, its query (if available), and its status.
Clicking any block with a nonzero value will open a modal with more detailed information. The monitor modals will list all monitors with the applicable status. The SLO modals will also display targets for each SLO that is passing or failing.
With the Datadog integration, you can create Scorecard rules and write CQL queries based on Datadog metrics, monitors, and SLOS.
The dependency sync runs automatically each day at 12 a.m. UTC, and can be run manually via the Sync dependencies button.
Can I set a Scorecard rule to monitor Datadog monitors/SLOs based on tags?
How does Datadog work with other dependency sources?
When leveraging multiple dependency sources such as Datadog and a catalog entity's YAML, all the sources would be merged together and Cortex will de-duplicate the dependencies.
For example, if an entity YAML indicates X → Y
and Datadog indicates X → Y
and X → Z
, the entity will display two edges presented as X → Y
and X → Z
.
In Cortex, navigate to the :
Region: Select your from the dropdown.
If you set an environment tag here, make sure to set the to match.
By default, Cortex will use the (e.g. my-entity
) as the "best guess" for Datadog tag. For example, if your entity tag is my-entity
, then the corresponding tag in Datadog should also be my-entity
.
See the for instructions on importing entities.
Adding monitors let you see information about their current status directly from a catalog - via the Monitors column - and under the Operations
section of an entity page. You can find your monitors from Datadog's .
Like monitors, Datadog SLOs can be found in the Operations
section of an entity page. You can find the SLOs for your instance on Datadog's .
Cortex automatically syncs dependencies from Datadog's , using the entity identifier (x-cortex-tag
) to map entities found in the Service Map.
The relationships Cortex discovers through the integration will feed directly into the , so you can easily visualize the connections between your entities.
You can override this by where tag
= entity
and value
= entity name in Datadog Service Map
.
See more examples in the in Cortex.
You can read more about Datadog's and in their docs.
from Datadog.
Cortex will pull recent changes from your Datadog environment into the . Here, you can find new entities in Datadog that have not been imported into the catalog - these will have the tag New APM Resource - as well as entities in the catalog that no longer exist in Datadog - these will have the tag APM Resource Not Detected.
Yes, you can that allow Cortex to discover your SLOs and monitors, and use these tags in Scorecard rules.