Dashboards & Visualizations

How to make a drilldown to another dashboard?

jihape
Path Finder

I can't find much info on the global tokens regarding this.

I'm trying to make a drilldown to another dashboard using the following code:

        <drilldown>
          <eval token="test_tok">mvindex(split($click.value$, " - "),0,0)</eval>
          <link>/app/$env:app$/rn-ps_depot_overview?form.depot_tok=$test_tok|s$</link>
        </drilldown>

However if I click the link I get an error:

The app "$env:app$" is not available
Any ideas or should I just put the app name in manually?
I'm on 6.5.2.

0 Karma
1 Solution

renjith_nair
Legend

@jihape ,

To open another dashboard in the same app, you don't need to mention the app name but just rn-ps_depot_overview?form.depot_tok=$test_tok|s$ should work for you. It will pick up the current app context automatically

        <option name="drilldown">cell</option>
        <drilldown>
          <link target="_blank">metric?form.node=$row.sourcetype$</link>
        </drilldown>
---
What goes around comes around. If it helps, hit it with Karma 🙂

View solution in original post

niketn
Legend

@jihape, add an independent search in your dashboard to assign $env:app$ to a field name and then use Search Event Handler to assign the same to a token to be passed on to the link.

Following is the independent search code snippet to be added to your dashboard. The tokeAppName can be used in <drilldown> <link>:

   <!-- Independent search to assign Environment App Name token to custom token to be used later in the dashboard -->
  <search>
    <query>| makeresults
    | eval currentAppName="$env:app$"</query>
    <done>
      <set token="tokAppName">$result.currentAppName$</set>
    </done>
  </search>

Following is what the <link> code will look like if you have already set the token tokAppName through the independent search:

  <link>/app/$tokAppName$/rn-ps_depot_overview?form.depot_tok=$test_tok|s$</link>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

renjith_nair
Legend

@jihape ,

To open another dashboard in the same app, you don't need to mention the app name but just rn-ps_depot_overview?form.depot_tok=$test_tok|s$ should work for you. It will pick up the current app context automatically

        <option name="drilldown">cell</option>
        <drilldown>
          <link target="_blank">metric?form.node=$row.sourcetype$</link>
        </drilldown>
---
What goes around comes around. If it helps, hit it with Karma 🙂

jihape
Path Finder

Oh yeah.. Not sure what I was thinking...

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...