Dashboards & Visualizations

How to pass token from a pie chart in dashboard to another dashboard which is not $click.value$

sangs8788
Communicator

I have a panel with Pie chart which has drilldown. Below is the code on the same

  <title>Platform Error Distribution - $tokPanel1$</title>
  <chart>
    <search>
      <query>index=app host="prod*"  error $tokPanel1_release_timerange$| eval layer="Application"| append [search index=app host="prod*" MQ _raw="*ERROR* $tokPanel1_release_timerange$ | eval layer="Queue"] | append [search index=app host="prod*" dataservice $tokPanel1_release_timerange$|eval layer = "DataService"] |stats count by layer</query>
      <earliest>0</earliest>
      <latest></latest>
    </search>
    <option name="charting.chart">pie</option>
    <option name="charting.drilldown">all</option>
     </chart>
</panel>

I want to switch on drilldown here to choose link based on the click.value which could be 'Queue' or 'dataservice' or 'Application'. Also along with the click.value, I want the $tokPanel1$ value in the title to be passed to the next dashboard. Is this achievable ?

0 Karma
1 Solution

niketn
Legend

@sangs8788, yes this is possible $tokPanel1$ should be accessible throughout the dashboard so you can pass it on to the new dashboard.

Can you provide a sample URL for second dashboard with sample token values i.e. $click.value$ and $tokPanel1$? Or else fill in the required details below for coding your drilldown like the following:

    <drilldown>
      <link target="_blank">/app/<YourAppName>/<YourSecondDashboardName>?<YourURLQueryString1>=$tokPanel1$&amp;<YourURLQueryString2>=$click.value$</link>
    </drilldown>

Replace required details i.e.
1) Your App name: <YourAppName>,
2) Your Launch Dashboard Name: <YourSecondDashboardName>,
3) Query string Key name for Panel: <YourURLQueryString1> and
4) Query string for clicked value: <YourURLQueryString2>

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

View solution in original post

0 Karma

niketn
Legend

@sangs8788, yes this is possible $tokPanel1$ should be accessible throughout the dashboard so you can pass it on to the new dashboard.

Can you provide a sample URL for second dashboard with sample token values i.e. $click.value$ and $tokPanel1$? Or else fill in the required details below for coding your drilldown like the following:

    <drilldown>
      <link target="_blank">/app/<YourAppName>/<YourSecondDashboardName>?<YourURLQueryString1>=$tokPanel1$&amp;<YourURLQueryString2>=$click.value$</link>
    </drilldown>

Replace required details i.e.
1) Your App name: <YourAppName>,
2) Your Launch Dashboard Name: <YourSecondDashboardName>,
3) Query string Key name for Panel: <YourURLQueryString1> and
4) Query string for clicked value: <YourURLQueryString2>

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

sangs8788
Communicator

Is it possible to choose link based on the click.value ?

0 Karma

niketn
Legend

@sangs8788, You can set tokens for links using set or eval based on the need and then pass the same to drilldown.

Can you give example as to what link you need to use based on clicked value?

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

sangs8788
Communicator

Something like this

For click.value==dataservice the link should be - /app/site/release_ds_detailed_report
For click.value==application the link should be - /app/site/release_app_detailed
_report

0 Karma

niketn
Legend

@sangs8788, Please try the following and confirm. Using eval tag I am settinglayerAconym token which is based on selected layer, i.e. ds for dataservice and app for application:

    <drilldown>
      <eval token="layerAcronym">case($click.value$=="dataservice","ds",$click.value$=="application","app")</eval>
      <link target="_blank">/app/site/release_$layerAcronym$_detailed_report</link>
    </drilldown>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...