Dashboards & Visualizations

Link a dashboard using drilldown

Uday
Explorer

Hi,

I am trying to link two  dashboards using drilldown option.

If I drilldown on server A, it should link to dashboard X.

If I drilldown on server B, it should link to dashboard Y.

Please suggest how to achieve this.

Labels (1)
0 Karma

bowesmana
SplunkTrust
SplunkTrust

@Uday 

When you save 'Server A' or 'Server B' do you mean the values in a table or a chart?

If you're talking about field values, then the token $click.value$ or $row.XX$ (for tables) will contain the value of that field you have clicked. 

You can then use a <condition> element with a match statement that can match to the value you're expecting and set the link URL accordingly.

See this document about token usage in dashboards, which has examples of using drilldown tokens and conditions.

https://docs.splunk.com/Documentation/Splunk/8.1.0/Viz/tokens

 

0 Karma

Marco
Communicator

Hi @Uday ,

If you click the source button, then find your visualization in the XML code, you should see this line of code:

<option name="charting.drilldown">none</option>

change that to all:

<option name="charting.drilldown">all</option>

Then inside the drilldown brackets add your conditions:

<drilldown>
<condition field="A">
<link target="_blank">X</link>
</condition>
<condition field="B">
<link target="_blank">Y</link>
</condition>

</drilldown>

 

-Marco

0 Karma

Uday
Explorer

Thank you. Please see the attached screenshot. I am not using a chart. I have both Unix and Windows servers. The window servers will have “w” in the server names highlighted in green and the rest are Unix servers. If I drill down on Windows server, it should take me to Y dashboard. If it is Unix server, it should take me to C dashboard.

0 Karma

bowesmana
SplunkTrust
SplunkTrust

@Uday 

Save this as a new dashboard. It shows 2 examples of doing what you want with the drilldown.

Left panel uses drilldown condition matching to determine which url and right hand uses pre-evaluated url path and hides that field in the table with the <fields> statement (can be done with tables).

<dashboard>
  <label>Test</label>
  <row>
    <panel>
      <title>This panel uses condition matches to check server name</title>
      <table>
        <search>
          <query>
| makeresults 
| eval servers=mvrange(1,11) 
| mvexpand servers 
| eval type=mvindex(split("W,U",","),random() % 2 - 1)
| eval status=mvindex(split("UP,DOWN",","),random() % 2 - 1)
| eval server=printf("%c_Server_%02d", type, servers)
| table server, status
          </query>
        </search>
        <option name="drilldown">row</option>
        <drilldown>
          <condition match="match($row.server$,&quot;W&quot;)">
            <link target="_blank">https://www.google.com.au?q=Windows</link>
          </condition>
          <condition match="match($row.server$,&quot;U&quot;)">
            <link target="_blank">https://www.google.com.au?q=Unix</link>
          </condition>
          <condition field="*"></condition>
        </drilldown>
      </table>
    </panel>
    <panel>
      <title>This panel uses fields statement and evaluated dashboard path</title>
      <table>
        <search>
          <query>
| makeresults 
| eval servers=mvrange(1,11) 
| mvexpand servers 
| eval type=mvindex(split("W,U",","),random() % 2 - 1)
| eval status=mvindex(split("UP,DOWN",","),random() % 2 - 1)
| eval server=printf("%c_Server_%02d", type, servers)
| table server, status
| eval dashboard=if(match(server,"W"),"path_to_y_dahsboard", "path_to_c_dashboard")
          </query>
        </search>
        <option name="drilldown">row</option>
        <fields>"server","status"</fields>
        <drilldown>
          <link target="_blank">$row.dashboard$</link>
        </drilldown>
      </table>
    </panel>
  </row>
</dashboard>

Hope this helps

 

0 Karma
Get Updates on the Splunk Community!

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...

Data Management Digest – November 2025

  Welcome to the inaugural edition of Data Management Digest! As your trusted partner in data innovation, the ...

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...