Link to a search

How linking to a search works

Linking to a search lets users explore additional fields, values, and other data related to the value they click. You can use a default search or customize the search that opens on a user click.

Example

This column chart shows event counts by sourcetype over the last week. 7.1 customize search.png

The chart is generated using the following search string.

index = _internal | stats count by sourcetype

Drilldown linking to a default search is enabled on the chart. If a user clicks the mongod sourcetype column in the chart, a secondary search opens. This search removes aggregations and generates an events list for the mongod sourcetype value.

Users can explore details for the mongod sourcetype that were not available in the column chart.

7.1 mongod.png

Configure the drilldown in the drilldown editor

You can use the drilldown editor to enable drilldown and configure linking to a search.

Note: To create conditional or other advanced behaviors in a drilldown, use Simple XML. An error message appears if you access the drilldown editor in panels with existing advanced configurations.

Prerequisites

Some default drilldown settings are new in software version 6.6.0. Review drilldown defaults and customization in Use drilldown for dashboard interactivity.

Steps

  1. From the dashboard where you want to configure drilldown, click Edit to open the dashboard editor.
  2. Find the panel where you are configuring drilldown. Click the additional options button and select Edit drilldown. 7.1 edit drilldown.png
  3. Select Link to search.
  4. Select a search type.
    • "Auto" generates a default search to remove aggregations and filter for values from the clicked element.
    • Select "Custom" to input a search string and time range.
  5. (Optional) Opt to open the search in a new browser tab.
  6. Click Apply to apply the drilldown settings.
  7. Click Save to save your dashboard changes.

Configure the drilldown in Simple XML

Click Edit to open the dashboard editor and click Source to access Simple XML source code.

Drilldown defaults and customization

Some default drilldown settings are new in software version 6.6.0. Review drilldown defaults and customization in Use drilldown for dashboard interactivity.

Enable the drilldown

Find the <option name="drilldown">none</option> element in the visualization. Change the option to enable and focus the drilldown. For example, in a table visualization, use <option name="drilldown">cell</option> to enable drilldown on table cells.

Once enabled, the drilldown links to a default search in the same browser tab.

Search syntax

Default search

Use the Simple XML <option> for the visualization where you are enabling drilldown. For example, the following source code in a bubble chart adds a drilldown linking to a search.

<option name="charting.drilldown">all</option>

Check the Simple XML Reference to review the <option> name and syntax to use for each visualization.

Custom search

In your dashboard source code, add the <drilldown> element to customize the linked search.

This example uses the target attribute to open the search in a new browser tab. The drilldown links to the search page and uses the q parameter to pass in the custom search string.

<drilldown>
    <link target="_blank">search?q=index=_internal | stats count by sourcetype</link>
</drilldown>

Link to custom search example