Dashboards & Visualizations

Multiple drilldowns

Naa_Win
Path Finder

Hello,

So I have a below dashboard panel which is populated with lookup. 

Name     Organization    Count
Bob            splunk                 2
Matt           google                15
smith          facebook            9 

What I'm looking for is. 
1. If I click the Bob, it has to open a new search tab with the query "| inputlookup mydetails.csv | search Name=Bob "
2. If I click the Splunk, it has to open a new url with "www.splunk.com"
For all the values respectively. 

How do I achieve this within one ?



Labels (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

 

<drilldown>
          <condition field="Name">
            <link target="_blank">| inputlookup myfile.csv</link>
          </condition>
          <condition field="Organization">
            <link target="_blank">$row.URL|n$</link>
          </condition>
          <condition field="URL">
            <link target="_blank">$click.value2|n$</link>
          </condition>
        </drilldown>

 

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust

You can use conditions in drilldowns to determine which field/column has been clicked

        <drilldown>
          <condition field="Name">
            <link target="_blank">your search link</link>
          </condition>
          <condition field="Organization">
            <link target="_blank">your organisation link</link>
          </condition>
        </drilldown>

Naa_Win
Path Finder

Thank you @ITWhisperer That Worked...... BUT !!!

But, it is having some defect... When I click the Splunk/google/facebook its going to "www.splunk.com" ONLY.

<link target="_blank">www.splunk.com</link>

I have a url as well in my lookup like, what I'm looking is if i click the splunk it has to go with respective url. same way with other organizations

Name     Organization       URL                                                                    Count 
Bob            splunk               www.splunk.com                                               2
Matt           google              www.google.com                                              15
smith          facebook         www.facebook.com                                        9 


Tags (1)
0 Karma

yuanliu
SplunkTrust
SplunkTrust

In drilldown, you have access to $click.value2$ which is the cell value.  You then program <condition/> with exact value.

0 Karma

Naa_Win
Path Finder
<drilldown>
          <condition field="Name">
            <link target="_blank">| inputlookup myfile.csv</link>
          </condition>
          <condition field="Organization">
            <link target="_blank">www.Splunk.com</link>
          </condition>
        </drilldown>

If I select Google in the Name field, it's getting redirect to the www.splunk.com only

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

 

<drilldown>
          <condition field="Name">
            <link target="_blank">| inputlookup myfile.csv</link>
          </condition>
          <condition field="Organization">
            <link target="_blank">$row.URL|n$</link>
          </condition>
          <condition field="URL">
            <link target="_blank">$click.value2|n$</link>
          </condition>
        </drilldown>

 

ITWhisperer
SplunkTrust
SplunkTrust

If this is not working, please share your exact dashboard source as something might have been lost in converting the answer to your solution.

0 Karma

bowesmana
SplunkTrust
SplunkTrust

@Naa_Win In your drilldown code do

<condition field="Organization">
  <link target="_blank">$row.URL$</link>
</condition>

Note that if you want to add any characters to the URL or url string that must be encoded, use

$row.URL|s$ or if you want to prevent any character encoding use $row.URL|n$

If you also want to do the same if the URL field is clicked, add a new condition with the field=URL

Naa_Win
Path Finder

@ITWhisperer @bowesmana  Thanks for the code, It didn't worked with my case. 

Sorry if it's confusing... I have a dashboard table with below.  If i click value in "Organization" or URL, it has to go specific url 

example: when i click google it has to direct to the url "  https://air222.com/recxGlfW9picLnjwj" in new tab. 
or if that doesn't work at least if i click url it has to go that url in new tab

Name     Organization                      URL                                                                                                             
Bob            splunk                         https://air222.com/6FBPUQ3Di0FC3T                                           
Matt           google                        https://air222.com/recxGlfW9picLnjwj                                    
smith          facebook                  https://air222.com/recRRoUIFOMxSmjRf                                          


0 Karma

bowesmana
SplunkTrust
SplunkTrust

It's not confusing, it should work if configured correctly.

So having changed the <condition>, what does it do when you click google?

What is the config for your

<option name="drilldown">XXX</option>

for that table?

XXX should be row

0 Karma

yuanliu
SplunkTrust
SplunkTrust

One panel can only use one type of drilldown.  There can be several ways to hack something out.  The most effective is to build a custom Web application to redirect the browser to whichever end URL it outputs based on the variables you send it.  Alternative, you may settle with a lesser workaround: drilldown to a custom search (or a dashboard, or even just change another panel on the same dashboard) to display the URL you intend to send the browser to; then ask your user to copy and paste.

0 Karma
Get Updates on the Splunk Community!

How to Get Started with Splunk Data Management Pipeline Builders (Edge Processor & ...

If you want to gain full control over your growing data volumes, check out Splunk’s Data Management pipeline ...

Out of the Box to Up And Running - Streamlined Observability for Your Cloud ...

  Tech Talk Streamlined Observability for Your Cloud Environment Register    Out of the Box to Up And Running ...

Splunk Smartness with Brandon Sternfield | Episode 3

Hello and welcome to another episode of "Splunk Smartness," the interview series where we explore the power of ...