Splunk Search

How to drilldown in pie chart based on the selection made

sangs8788
Communicator

Hi ,

I have a pie chart with different dataservices and its size percentage. I am trying setup drilldown for each of these dataservices. Like if DB2 clicked, it should take me to DB2 database size dashboard, if MSSQL clicked it should take me to MSSQL database size dashboard.

Here is the drilldown code i have,

        <link><![CDATA[/app/sre/$click.value$_size_details?form.field1.earliest=$earliest$&form.field1.latest=$latest$&earliest=0&latest=]]></link>
     </drilldown>

I have one drilldown link pattern. I am able to get $click.value$ based on the click made in the dashboard. But the problem is it is in uppercase "DB", "MSSQL" etc. Whereas the actual view id the drilldown has to traverse through is in lowercase like this - /app/sre/mssql_size_details?form.field1.earliest=$earliest$&form.field1.latest=$latest$&earliest=0&latest=

How do I convert the $click.value$ to lowercase and then pass it on the url ?

Thanks

Tags (1)
0 Karma
1 Solution

niketn
Legend

@sangs8788, Is this a drilldown from table or chart? Can you try the following (eval sets token to lower case and then used by drilldown):

<drilldown>
     <eval token="lowerDBName">lower($click.value$)</eval>
     <link><![CDATA[/app/sre/$lowerDBName$_size_details?form.field1.earliest=$earliest$&form.field1.latest=$latest$&earliest=0&latest=]]></link>
</drilldown>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

0 Karma

niketn
Legend

@sangs8788, Is this a drilldown from table or chart? Can you try the following (eval sets token to lower case and then used by drilldown):

<drilldown>
     <eval token="lowerDBName">lower($click.value$)</eval>
     <link><![CDATA[/app/sre/$lowerDBName$_size_details?form.field1.earliest=$earliest$&form.field1.latest=$latest$&earliest=0&latest=]]></link>
</drilldown>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

sangs8788
Communicator

It is pie chart. Thanks it worked.

0 Karma

niketn
Legend

Hi Glad it worked. I have converted to answer. Please accept.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

preacher_15
Explorer

@niketnilay how to drill down from a donut chart using the $click.value$....the clicked value is not getting passed ...please help.

0 Karma

niketn
Legend

Which is the visualization you are using as donut has 2-3 viz for donut on Splunkbase. Some support built in drill down for others JS based drill down would need to be coded depending on viz DOM structure.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

preacher_15
Explorer

@niketnilay i am using a custom 2d donut chart which was created by my teammates...when i click on the donut new panel is opening as a drilldown but it shows no results found...if i check the query the token is passed just as i have given.. token=$click.value$...it is not taking the clicked value .

0 Karma

niketn
Legend

@preacher_15 if it is your custom app you would need to check code and ensure drill down is present. By default custom visualization s do not have drill down enabled. Good thing is you can code it yourself as per how you have built the custom visualization.

You can also follow existing custom visualization for donut which has drill down and create something similar.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

preacher_15
Explorer

@niketnilay any inputs regarding this?? need help..

0 Karma
Get Updates on the Splunk Community!

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to Officially Supported Splunk ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI! Discover how Splunk’s agentic AI ...