Linking interactions
You can add various linking interactions to a dashboard, such as adding a link to another dashboard for a deeper dive into data specifics. For example, a visualization showing sales revenue across a world map can link to a completely different dashboard that breaks down the specific data points of each major city in a regional area. Both visualizations and shapes can link to another dashboard, custom URL, report, or another tab in the same dashboard.
Link to a custom URL
The URL can be relative, such as coming from a local site, or absolute from an external site. Links that direct outside of the Splunk Platform require token filters to handle tokens with spaces. For more details, see Token filters in the Dashboards and Visualizations manual.
To link to a custom URL, complete the following steps:
- Select the visualization you want to link to a custom URL. Selected visualizations highlight with a blue border.
- Navigate to the Interactions section of the Configuration panel.
- Select +Add Interaction.
- Select Link to custom URL from the On click dropdown list.
- Provide a relative or absolute URL.
Note: If you do not provide an https:// address, the generated URL is considered internal to Splunk Enterprise and uses a localhost URL, such as
/. If you provide an https:// prefix, such ashttps://splunk.com, the link directs to that external URL. - (Optional) Select Open in new tab to have the linked URL open in a new tab.
- Select Apply.
When linking from a visualization with data, you must click the actual value in the visualization, not just anywhere, to go to the link.
Configure a custom URL with a token
Custom URL linking can also use the token syntax row.<fieldname>.value instead of a relative or local URL. For example, a table visualization might have multiple fields of URLs that connect to a token and can open on a new tab when a user selects the URL.
Expand the window to see the full source code for the example of using a token as a custom URL. Notice the $row.Link.value$ token used as the url.
{
"visualizations": {
"viz_w5uvUoyO": {
"type": "splunk.table",
"options": {},
"dataSources": {
"primary": "ds_tZlX9WS9"
},
"title": "Using $row.Link.value$ as the custom URL link",
"eventHandlers": [
{
"type": "drilldown.customUrl",
"options": {
"url": "$row.Link.value$",
"newTab": true
}
}
],
"description": "Select a value from the Link column"
}
},
"dataSources": {
"ds_tZlX9WS9": {
"type": "ds.search",
"options": {
"query": "| makeresults count=3 \n| streamstats count\n| eval Resource=case(count=1, \"Splunk.com\", count=2, \"Splunk Documentation\", count=3, \"Splunk Community\")\n| eval Link=case(count=1, \"https://www.splunk.com/\", count=2, \"https://docs.splunk.com/Documentation\", count=3, \"https://community.splunk.com/\")\n| fields - count _time"
},
"name": "Search_1"
}
},
"defaults": {
"dataSources": {
"ds.search": {
"options": {
"queryParameters": {
"latest": "$global_time.latest$",
"earliest": "$global_time.earliest$"
}
}
}
}
},
"inputs": {
"input_global_trp": {
"type": "input.timerange",
"options": {
"token": "global_time",
"defaultValue": "-24h@h,now"
},
"title": "Global Time Range"
}
},
"layout": {
"tabs": {
"items": [
{
"layoutId": "layout_1",
"label": "New tab"
}
]
},
"layoutDefinitions": {
"layout_1": {
"type": "absolute",
"options": {
"width": 1440,
"height": 960,
"display": "auto"
},
"structure": [
{
"item": "viz_w5uvUoyO",
"type": "block",
"position": {
"x": 50,
"y": 60,
"w": 590,
"h": 200
}
}
]
}
},
"globalInputs": [
"input_global_trp"
]
},
"description": "",
"title": "Custom URL using a token"
}
Switch to another tab
Switch to another tab in the same dashboard if the dashboard has multiple tabs.
To set up the switch to tab interaction, complete the following steps:
Select the visualization that you want to link to another tab. Selected visualizations highlight with a blue border.
Navigate to the Interactions section of the Configuration panel.
Select +Add interaction.
Select Switch to tab from the On click dropdown list.
Choose the tab you want to switch to from the Select a tab dropdown list.
Select Apply.
Link to another dashboard
The dashboard you link to can exist in a separate application from the originating dashboard.
To link to another dashboard complete the following steps:
- Select the visualization you want to link to another dashboard. Selected visualizations highlight with a blue border.
- Navigate to the Interactions section of the Configuration panel.
- Select +Add Interaction.
- Select Link to dashboard from the On click dropdown list.
- Use the Select an App dropdown and search for the app that maintains your dashboard by filtering the name.
- Use the Select a Dashboard dropdown and search for the dashboard you want to link to by filtering the name.
- The following steps are optional.
- If your dashboard has tabs, select which tab within the dashboard that you want to link to. The first tab is selected by default.
- View the dashboard to verify you are linking to the expected dashboard.
- Select Open in new tab to have the linked dashboard open in a separate tab.
- Select Apply.
When linking from a visualization with data, you must click the actual value in the visualization, not just anywhere, to go to the link.
Source code for linked dashboard example
The source code example shows where you set a token's value and its name in the table. In this example, the token's value is row.splunkd.value, and the token's name is token_example.
{
"type": "splunk.table",
"options": {
"columnFormat": {
"splunk_assist_internal_log": {
"width": 66
},
"splunk_secure_gateway_modular_input.log": {
"width": 85
}
}
},
"showProgressBar": false,
"showLastUpdated": false,
"dataSources": {
"primary": "ds_rv9OQcNy"
},
"eventHandlers": [
{
"type": "drilldown.linkToDashboard",
"options": {
"app": "search",
"dashboard": "classic__clone",
"tokens": [
{
"token": "token_example",
"value": "row.splunkd.value"
}
],
"newTab": true
}
}
],
"context": {}
}
Set tokens with a linked dashboard
You can pass token values from one dashboard to another linked dashboard. You can use more than one token. For steps to pass token values, see Setting tokens in this topic and Setting tokens from search results or search job metadata.
Example of linking to a dashboard
The following example links a dashboard from a table visualization. The table has a token set on the value splunkd. When you interact with the table and select a value in the splunkd column, Dashboard Studio opens a new tab with the linked dashboard.
Link to a report
To link to a report, complete the following steps:
- Select the visualization you want to link to a report. Selected visualizations highlight with a blue border.
- Navigate to the Interactions section of the Configuration panel.
- Select +Add Interaction.
- Select Link to report from the On click dropdown list.
- Choose the app associated with your report from the Select an app dropdown list.
- Choose the report you want to link from the Select a report dropdown list.
- (Optional) Select Open in a new tab, if you want to keep your dashboard and report in separate open tabs.
- Select Apply.
When linking from a visualization with data, you must select the actual value in the visualization to go to the link. For more details about interactions, see Setting tokens on a visualization click.
Investigate data deeper by linking to a search
Link from your dashboard to search pages for further analysis of data details. For example, suppose atypical behavior appears on a visualization of a monitoring dashboard. If the visualization is linked to a search, you can select the deviating data point to open a search that uses the dashboard context as a starting point.
Linking to a search
To link to a search, complete the following steps:
- Select the object you want to link to a search. Selected objects highlight with a blue border. Objects include visualizations, images, and text.
- Navigate to the Interactions section of the Configuration panel.
- Select + Add interaction.
- Select Link to search from the On click dropdown list.
- Select Auto or Custom from the Search options.
- An Auto search is based on an existing search. Auto searches are the default unless a visualization has no associated search.
- If no searches are available, Custom becomes the default search. You can write a new SPL query with a Custom search. See Investigate data deeper by linking to a search.
- (Optional) Select Open in new tab, if you want to keep your dashboard and search results in separate open tabs.
- Select Apply.
With custom search, you can enter your linked search SPL query and time range. If the visualization has an existing search, the time range defaults to Auto, which uses the same time range associated with the existing search. You can override the time range by specifying a static time range or selecting a time range input.
Custom search tokens
You can enter any predefined token in a custom search. Dashboard Studio supports the following predefined tokens:
- name
- value
- row.<fieldname>.value
For details about tokens, see Setting tokens on a visualization click.
Custom time range options
Custom link to search has the following time range options:
- Auto matches the time range to the visualization's existing search time range. If no time ranges are available, the Auto option is inactive.
- Static provides a selection of typical time ranges and ways to customize time ranges. You can select a time range from the Time range dropdown list.
- Input sets the time range by interactive dashboard inputs. You can select an input from the Time range dropdown list. If no time range inputs are available, the Input option is inactive.
The results for an Auto linked search vary depending on the object associated with the search. For example, a search linked to a bubble map bases its results on the geographic boundaries of the circle selected. A search linked to an area chart bases its results on the selected data point and the timestamp associated with that data point. A search linked to a table bases its results on the selected table.
The following is an example of an auto link to search that shows how a data point on an area chart can link to search results that open on a separate tab.
Source code
You can see the link to search in the eventHandlers section of the dashboard definition.
{
"visualizations": {
"viz_rwLX0WFU": {
"type": "splunk.area",
"options": {},
"dataSources": {
"primary": "ds_h3Q1Keuz"
},
"eventHandlers": [
{
"type": "drilldown.linkToSearch",
"options": {
"type": "auto",
"newTab": true
}
}
]
}
},
"dataSources": {
"ds_h3Q1Keuz": {
"type": "ds.search",
"options": {
"query": "index=_internal \n| timechart count by sourcetype"
},
"name": "Search_1"
}
},
"defaults": {
"dataSources": {
"ds.search": {
"options": {
"queryParameters": {
"latest": "$global_time.latest$",
"earliest": "$global_time.earliest$"
}
}
}
}
},
"inputs": {
"input_global_trp": {
"type": "input.timerange",
"options": {
"token": "global_time",
"defaultValue": "-24h@h,now"
},
"title": "Global Time Range"
}
},
"layout": {
"tabs": {
"items": [
{
"layoutId": "layout_1",
"label": "New tab"
}
]
},
"layoutDefinitions": {
"layout_1": {
"type": "absolute",
"options": {
"width": 1440,
"height": 960,
"display": "auto"
},
"structure": [
{
"item": "viz_rwLX0WFU",
"type": "block",
"position": {
"x": 60,
"y": 50,
"w": 1340,
"h": 640
}
}
]
}
},
"globalInputs": [
"input_global_trp"
]
},
"description": "",
"title": "Auto link to search example"
}