Add dynamic filters to a Dynatrace dashboard

Dashboards Classic

The dashboards discussed here are classic dashboards created using the dashboarding functionality integrated with previous Dynatrace.

  • For more about classic dashboards, see Dashboards Classic.
  • For more about dashboards created with the Dashboards app in the latest Dynatrace, see Dashboards.
  • To improve your dashboard experience, you can upgrade existing dashboards from Dashboards Classic to the Dashboards app in the latest Dynatrace.

You can add multiple dynamic filters to a dashboard. They are all displayed as filter options when you select in the dashboard filter bar.

What is a dynamic dashboard filter?

Suppose you have a very simple dashboard with just Host health and CPU usage for all hosts in your environment.

Dashboard dynamic filters: before adding a filter to dashboard

If you add a dynamic filter for operating system:

  • A filter bar is added to the dashboard.

    Dashboard filter bar

  • You are still able to display the unfiltered dashboard as above, with all hosts displayed regardless of the operating system, but you now have the option to filter the dashboard by operating system.

    1. Select the filter name. In this case, there is only one filter available to select because that's all we added in this example.

      Dashboard dynamic filters: after adding a filter to dashboard, selecting filter

    2. Select a filter value. In this case, there are five operating systems from which to choose.

      Dashboard dynamic filters: after adding a filter to dashboard, selecting filter value

    3. When you view the dashboard now, both tiles are filtered by the selected operating system. In this example, our 1721 hosts have been filtered down to just the three hosts in our environment that matched the filter.

      Dashboard dynamic filters: after filtering dashboard

Read below to learn how to add such filters to your own dashboards.

Limitations

If a metric has multiple entity types, management-zone filtering isn't applied. This limitation impacts metrics with the dimensions dt.entity.monitored_entity or dt.entity.device_application. For details, see Filter classic metrics by management zone.

Dynamic filters tab

The Dynamic filters tab of the Dashboard settings page is where you define and manage filters for a dashboard.

You can get there from the Dashboards table or the currently displayed dashboard.

From the Dashboards table

  1. Go to Dashboards or Dashboards Classic (latest Dynatrace).
  2. In the Dashboards table, find the dashboard you want to edit.
  3. Select More () > Configure to open Dashboard settings for that dashboard.
    If you don't see a Configure entry in the menu, you don't have edit rights for the selected dashboard.
  4. Select the Dynamic filters tab.

From a dashboard

  • If you are already on the dashboard that you want to edit, and you have not added any filters to the dashboard, the following notice is displayed:
    "No dynamic filters have been defined for this dashboard. Add dynamic filters or learn more."

    Select the Add dynamic filters link to go directly to Dynamic filters.

  • If you have already added filters to the dashboard, there is no such notice.

    1. Select Edit in the upper-right corner of the dashboard.
      If you don't see an Edit button, you don't have edit rights for the selected dashboard.

    2. Select the Settings tab.

    3. Select Configure more.

    4. Select Dynamic filters.

      The "Dynamic filters" tab of a dashboard

Add or edit dynamic filters

  1. On the Dynamic filters tab, select Add filter.

  2. Select a filter from the Filter criteria list.

    Some filters require additional input. When you make a selection in the Filter criteria list, an additional entry field is displayed.

    For details, see Example 2: filter by application tag key and Example 3: filter by custom dimension.

  3. Select Save changes.

  4. Repeat the above steps for each filter you want to add to the dashboard.

  5. Display the dashboard.
    A filter bar is displayed under the dashboard name.

  6. In the filter bar, select a filter and a value.
    The dashboard is filtered by your selection.

Filter evaluation

  • A filter can only be used with those dimensions that exist on the metric.

  • Individual filters on a dashboard are AND-conjuncted.

    Tag filters and custom dimension filters for the same dimension key/entity are OR-conjuncted.

    If there are multiple filters (either predefined or for another custom dimension), these are AND-conjuncted.

  • Custom dimension filters and generic tag filters apply only to tiles that you create in Data Explorer and pin to the dashboard.

    They do not apply to standard tiles that you drag to the dashboard from the Tiles pane in the dashboard editor, or that you pin to the dashboard from another page such as Hosts.

  • Remember:

    • An explicit filter is defined in a Data Explorer query and applies to any tile created from that query. It applies only to series related to the selected dimension in that tile.
    • A custom dimension dynamic filter also applies to all series that don’t have the selected dimension in a tile.

Example 1: filter by operating system

  1. Go to the Dynamic filters tab for the dashboard you want to edit.

  2. Select Add filter.

  3. Select OS type from the Filter criteria list.

  4. Select Save changes.

  5. Display the dashboard. The Host health tile displays the host health for all hosts in the environment, regardless of operating system.

    Dashboard dynamic filters: before adding a filter to dashboard

  6. In the filter bar, select Operating system, and then select an operating system. The dashboard is now filtered by the selected operating system. If you selected Windows, the Host health tile now displays the host health only for the Windows hosts in the environment.

    Dashboard dynamic filters: after filtering dashboard

  7. To check which filters are applied to a tile, hover over the filter icon in the upper-right corner of the tile. In this case, "Operating system: Windows" is displayed in a tooltip.

    Dashboard filter tooltip

You can add multiple filters to a dashboard. They are all displayed as filter options in the dashboard filter bar.

Example 2: filter by application tag key

To filter a dashboard by tags, you first need to tag the components (applications, hosts, services, process groups, or process group instances) in your environment to which your dashboard applies. In this example, we filter our dashboard by tags applied to applications.

To filter a dashboard by application tags

  1. Apply tags (key/value pairs) to applications
    For each application to which your dashboard applies, tag the application with key/value pairs that can be filtered on.
  2. Create a filtered dashboard
    Create a dashboard with application-relevant content—for simplicity, we have added a single Application health tile—and add an optional Application tag filter for the keys with which you tagged your applications.
  3. Display the filtered dashboard
    Display the dashboard and set the filter. This focuses the dashboard on the applications that are tagged with matching key/value pairs.

Apply tags (key/value pairs) to applications

  1. Go to Settings and select Tags > Manually applied tags.
  2. Enter key/value pairs and apply them to applications. In this example, we applied the following:

    Dashboard filtering: apply demo-key-01/demo-value-01

    Dashboard filtering: apply demo-key-01/demo-value-02

    Dashboard filtering: apply demo-key-01/demo-value-03

Create a filtered dashboard

  1. Go to Dashboards or Dashboards Classic (latest Dynatrace).

  2. Select Create dashboard, enter a dashboard name, and select Create to create a new dashboard.

  3. Drag an Application health tile to the dashboard.

  4. Select the Settings tab and then select Configure more.

  5. On the Dynamic filters tab:

    • Select Add filter.
    • From the Filter criteria list, select Application tag key.
    • In Tag key, enter demo-key-01, which is the key we used to tag some applications earlier.

    Dashboard filtering: add application tag to dashboard

  6. Select Save changes.

Display the filtered dashboard

  1. Display the dashboard.
    With no filter set, the Application health tile displays the health of all applications monitored in your environment.

  2. Select in the filter bar under the dashboard name to see the available filters for this dashboard. In our example, we have added just one: Application tag. Select it.

    Dashboard filtering: select application tag filter in dashboard

  3. In our example, we have added just one application tag key: demo-key-01. Select it.

    Dashboard filtering: select application tag in dashboard

  4. In our example, we have added three different values for the key: demo-value-01, demo-value-02, demo-value-03. Select one of them.

    Dashboard filtering: select application tag value in dashboard

  5. Now the dashboard displays the health of all applications that have the selected key/value pair. You can add other pairs to the filter. For example, you could display the health of all applications that have the key/value pair demo-key-01/demo-value-01 or demo-key-01/demo-value-02 (or both).

  6. If you drill down from the tile, the Applications page is displayed with the currently selected filter applied.

    Dashboard filtering: drill down from a filtered dashboard

Example 3: filter by custom dimension

Custom dimension filters apply only to tiles that you create in Data Explorer and pin to the dashboard. They do not apply to standard tiles that you drag to the dashboard from the Tiles pane in the dashboard editor, or that you pin to the dashboard from another page such as Hosts.

To filter tiles by a custom dimension

  1. Go to the Dynamic filters tab for the dashboard that you want to filter by a custom dimension.
  2. Select Add filter.
  3. In the Filter criteria list, select Custom dimension.
    The Dimension key list is now displayed.
  4. Select or type a value for Dimension key.
  5. Save your changes.

Remember:

  • An explicit filter is defined in a Data Explorer query and applies to any tile created from that query. It applies only to series related to the selected dimension in that tile.
  • A custom dimension dynamic filter also applies to all series that don’t have the selected dimension in a tile.