Datadog dashboards provide a foundation for monitoring and troubleshooting your infrastructure and applications, and template variables allow you to focus your dashboards on a particular subset of hosts, containers, or services based on tags or facets.
We’re pleased to announce template variable associated values, which can help you speed up your troubleshooting by dynamically presenting the most relevant values for your template variables. Associated values enable you to isolate the most useful data, and they are now available with no additional setup.
Associated values make it easy to filter your data and focus your exploration by placing the most relevant values within easy reach. As you select a value for each template variable, Datadog automatically finds the associated values for the dashboard’s other template variables and places them at the top of the list.
The dashboard shown below includes two template variables—
$deployment. The deployment’s associated values list contains only values that are relevant for the selected namespace and which you are therefore most likely to select. Below that, the other values list contains the rest of the template variable’s available values. You can select any item in either list or begin typing to dynamically filter both lists.
With each template variable you define, the list of associated values becomes more focused for the remaining template variables. This makes it easy to move from a broad context—which can be a good investigative starting point—to a more granular view of a key subset of your hosts and services.
In the Kubernetes dashboard below, the
$cluster template variable establishes a broad context by filtering out all data not relevant to
istio-demo-prod. The other template variables frame a progressively narrower focus. We’ve selected values for the
$service template variables, and
$node shows associated values relevant to that context. In other words, the associated nodes are the ones in the cluster named
istio-demo-prod that are part of the selected deployment (
productpage-v1) and are running the selected service (
Template variables make use of the tags and facets on your infrastructure and services. Datadog applies some of these tags automatically based on metadata from your cloud provider and container orchestrator. Additionally, you can apply custom tags to create dimensions that allow you to explore your data in ways that make the most sense for your business.
For example, if you’ve applied a
team tag to your hosts to indicate ownership, you can use a template variable to easily zero in on each team’s hosts. In the screenshot below, the list of values presented at the top of the
host template variable only includes hosts that belong to the selected team, making it less likely that you’ll dial in a combination that doesn’t show relevant data.
To learn about creating a tagging strategy that allows you to quickly filter your dashboard based on your own tags, see our best practices for tagging your infrastructure and applications.
Template variable associated values do not require any configuration, so you can start using them right away to swiftly zoom in on dashboard data from more than 600 technologies. And when you capture your dashboard contexts as saved views, you can easily share them for troubleshooting across teams.