Think about all the people who need to interact with your custom dashboards to quickly access relevant data insights. To reduce any toil for your dashboard users, you’ll want to make your dashboards navigable, understandable, and adaptable to similar use cases.
When visiting a new dashboard, it can be challenging for your stakeholders to understand how the data is structured or what each attribute or value conveys. Without that understanding, it’s difficult or inefficient for them to filter the dashboard for the data that’s relevant to them. On top of that, others in your organization trying to use your dashboard for different use cases find it time-consuming and tedious. They’d need to make multiple copies of the dashboard and configure each dashboard’s widgets to fit their respective use case.
Introducing template variables for easy, precise dashboard filtering
In New Relic custom dashboards, template variables serve as placeholders in your NRQL queries that users can later assign a value. After the value is assigned, the relevant dashboard widgets automatically change to reflect that value.
Instead of needing to hard-code a specific host or entity name, people in your organization now have the flexibility to switch between different values depending on their use cases. For example, let’s say you have a dashboard that monitors performance data for only a specific service. Repurposing the dashboard to monitor other services would require duplicating it and manually hard-coding changes. Now you can build a single dashboard that tracks any combination of services by easily swapping different values in and out of a template variable.
Ways to take advantage of template variables in your dashboards
Template variables unlock the possibility to have dynamic, highly interactive dashboards. Everyone who uses your dashboards can get data relevant with more precise and easy-to-digest filtering.
With template variables, you can:
- Get all filtering controls in one place. The new variables filter bar better informs all dashboard users about the values that are important to filter by, which makes it easier to understand what changes are made with each filter selection.
- Get more precise results. Selecting a value for a template variable only applies to the widgets that include that specific variable placeholder. Data from other widgets that are irrelevant to the filter remain visible.
- Turn your dashboards into templates. You can make your variables pull from a dynamic list of values generated from a query. This allows your dashboard to move from one account to another without inhibiting its functionality or requiring you to redo your widget queries every time.
Watch this video to see ways to use template variables:
Set up and get started with template variables
To create a template variable, go to your dashboard and select the + button to add a variable.
1. Enter both a query name and a display name. The query name is how you’ll refer to the template variable when writing your NRQL query. The display name is how your template variable appears in the overhead filter bar.
2. Next, choose the variable type. There are three types of template variables available for customizing your dashboard:
- Text variable. Enable the dashboard users to input any text they want to filter for.
- List variable. Provide the dashboard users with a list of preselected options to choose from.
- Query variable. Give the dashboard users a list of options that are returned from another NRQL query.
3. Finally, depending on the variable type you selected, you might need to input the options that your dashboard users can select (for list variables) or the query (for query variables).
To learn more about the setup process and the limitations for template variables, see Template variables: dynamically filter dashboards.
If you're not already using New Relic, sign up for a free account. Your account includes 100 GB/month of free data ingest, one free full-access user, and unlimited free basic users.
이 블로그에 표현된 견해는 저자의 견해이며 반드시 New Relic의 견해를 반영하는 것은 아닙니다. 저자가 제공하는 모든 솔루션은 환경에 따라 다르며 New Relic에서 제공하는 상용 솔루션이나 지원의 일부가 아닙니다. 이 블로그 게시물과 관련된 질문 및 지원이 필요한 경우 Explorers Hub(discuss.newrelic.com)에서만 참여하십시오. 이 블로그에는 타사 사이트의 콘텐츠에 대한 링크가 포함될 수 있습니다. 이러한 링크를 제공함으로써 New Relic은 해당 사이트에서 사용할 수 있는 정보, 보기 또는 제품을 채택, 보증, 승인 또는 보증하지 않습니다.