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.
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
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
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.
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$,"W")">
<link target="_blank">https://www.google.com.au?q=Windows</link>
</condition>
<condition match="match($row.server$,"U")">
<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