Splunk Search

Creating drilldown to new tab for auto search without adding custom search

aalvino
Engager

I am trying to make it so if a user clicks on any cell in a Dashboard showing a Statistics table, that will result in a search being launched in a new tab. The "Auto" search does exactly what I want it to do, so I want to be able to use that, but have it launch in a new tab.

There is no option to enable that in the UI.
There are a number of answers in here which show to add the following to the XML.

target="_blank"

The problem is that "target" is part of the link structure. I don't have a link defined because I am using the Auto search. Is there a way to do this without adding a custom search? My search is very long and contains a number of characters (? and &) which then fail in the XML code, so I am manually making many updates to the XML for any change that I make to the search. It is quite tedious.

Any help would be appreciated.

Thanks
Tony

0 Karma

rrovers
Contributor
  • select "edit"
  • select "more actions" in the panel of the drilldown
  • choose "edit drilldown"
  • tab custom
  • check "open in new tab"
0 Karma

gregbo
Communicator

When i do that, the search on the new tab doesn't include the values that were clicked on, like in Auto.

0 Karma

renjith_nair
Legend

@aalvino ,

If the concern is only changing the search, one of the possibilities you could try is to set the search token and use that in the drilldown.

Add these to your actual search's done event

         <done>
            <set token="srch">$job.search$</set>
            <set token="earliest_time">$job.earliestTime$</set>
            <set token="latest_time">$job.latestTime$</set>
            <set token="sid">$job.sid$</set>
          </done>

Use the below in your drilldown

       <drilldown>
          <link target="_blank">search?q=$srch$&amp;earliest=$earliest_time$&amp;latest=$latest_time$&amp;sid=$job.sid$&amp;display.page.search.mode=smart&amp;dispatch.sample_ratio=1%0A&amp;workload_pool=&amp;display.page.search.tab=statistics&amp;display.general.type=statistics</link>
        </drilldown>

In this case, even though you change your search or time range, it will reflect in the token and hence in the target link

---
What goes around comes around. If it helps, hit it with Karma 🙂
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 ...