Other Usage

How to configure a drilldown for a dashboard selecting the option "Link to custom URL" from the UI?

sricula
Observer

Hi, I am trying to configure a drilldown for a dashboard selecting the option "Link to custom URL" from the UI.

The link is basically a splunk search, idea being when a user clicks on the bar chart, a corresponding search page opens up based on the row where the user clicked. So the name of the row is dynamic/clickable.

To pass the row name to the search query I have tried multiple in-built tokens, $click/name/row.value/value2$ and more. When I click on a row this token is not processing. It stays click.value2 or whatever is used.

example search query:

index=abcd sourecetype="stype" field1=$click.value$

On the Barchart x-axis is field1, when I hard code a value into the search query it works great. When using token I get no results.

Any suggestions what I am doing wrong or can try differently. Thanks in advance !!

Labels (1)
0 Karma

sricula
Observer

@richgalloway Thanks for the reply. So the "Link to custom URL" feature does not support dynamic values?

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Yes, it does support dynamic values.  The content of $click.value2$ is dynamic.

---
If this reply helps you, Karma would be appreciated.
0 Karma

sricula
Observer

Well that is where I am using $click.value$

May be I was not clear, the URL in the "link to custom URL" opens a new tab with a search query which is part of the URL. One of the fields in this query is dynamic based on what is clicked. But when the new tab opens the search does not return anything because $click.value$ is not processed. When I hard code it, works fine and I get results back.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

The drilldown URL is created by the dashboard. All token substitutions happen at that time, not in the target search query.  The target query has no idea what "$click.value$" is.

<drilldown>
  <link target="_blank">https://example.com?foo=$click.value$</link>
</drilldown>

See https://docs.splunk.com/Documentation/Splunk/9.0.4/Viz/DrilldownLinkToURL for more information.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...