Skip to content

Latest commit

 

History

History
102 lines (73 loc) · 5.88 KB

filter-new-relic-one-dashboards-facets.mdx

File metadata and controls

102 lines (73 loc) · 5.88 KB
title tags translate metaDescription redirects freshnessValidatedDate
Filter New Relic dashboards by facets
Query your data
Explore and query data
Dashboards
jp
New Relic dashboards: You can use facet filtering to filter dashboards by specific attributes.
/docs/dashboards/new-relic-one-dashboards/manage-your-dashboard/use-facets-filter-dashboards
/docs/dashboards/new-relic-one-dashboards/manage-your-dashboard/filter-dashboards-facets
/docs/dashboards/new-relic-one-dashboards/manage-your-dashboard/filter-new-relic-one-dashboards-facets
never

import dashboardsFacetFiltering from 'images/dashboards_screenshot-crop_facet-filtering.webp'

import dashboardsFacetFilteringExample from 'images/dashboards_screenshot-crop_facet-filtering-example.webp'

import dashboardsFacetCases from 'images/dashboards_screenshot-crop_facet-cases.webp'

import dashboardsFacetCasesExample from 'images/dashboards_screenshot-crop_facet-cases-example.webp'

You can filter your New Relic dashboards by faceted attributes, making your dashboards more interactive and easy to use.

Why use facet filtering? [#feature]

For our dashboards, any NRQL queries containing a FACET clause and meeting other chart-type requirements, you can set up the faceted attributes to filter the current dashboard or a related, linked dashboard. By letting you quickly filter your dashboards, and link to pre-filtered dashboards, your dashboards are more interactive and easy to use.

This feature is available when adding a new chart to a dashboard or when editing a chart on an existing dashboard.

To see this feature in action, see the example use case.

Requirements

Requirements to use this feature:

Example use of facet filtering [#example-use]

Let's say you create the following facet-containing NRQL query for an existing dashboard in the UI:

facetfiltering01bis.png

**[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > Dashboards**: For queries containing a `FACET` clause and meeting [chart-type requirements](#requirements), you can set those attributes to be used as an easy dashboard filter. You can set the attribute to filter the current dashboard you're on, or filter a related dashboard that you select.

If you select Filter the current dashboard, that chart will be used to filter the current dashboard by the available userAgentName attributes. Here's a view of selecting one of those attributes to filter that dashboard. Notice that the chosen attribute appears as a filter in the search bar at the top.

facetfiltering02.png

**[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > Dashboards**: When you select an attribute you've set up for facet filtering, it filters the current dashboard.

For more about this feature, see the Support Forum post on facet filtering.

Facet linking with the FACET CASES clause [#facet-linking-cases]

FACET CASES is a NRQL function that allows to group facets based on conditions. We support multiple cases in the same facet.

Let's say you want to query some data and put the responses into mnemonic categories for a dashboard or report. This syntax will allow you to query based on transaction duration and put the results into two categories: ACCEPTABLE and UNACCEPTABLE. This can be really useful for making dashboards more human readable and actionable.

SELECT filter(count(*), WHERE duration > 1) as 'UNACCEPTABLE', filter(count(*), 
WHERE duration <=1) as 'ACCEPTABLE' 
FROM Transaction  FACET appName LIMIT 5 since 5 minutes ago

facet_cases_01.png

By using FACET CASES, we can more efficiently use multiple complex conditions to generate a set of custom facets. Building on the previous example, let's say we want to include a compound condition which excludes errors from our duration data and adds them into a third category:

SELECT count(*)
FROM Transaction FACET CASES (where duration > 1 and error is NULL as 'UNACCEPTABLE', where duration <= 1 and error is NULL as 'ACCEPTABLE', where error is not NULL as 'ERROR') since 5 minutes ago

facet_cases_02.png

Then, using facet linking, you can filter your dashboards by those facets.