Dashboards & Visualizations

How to drilldown bar chart and populate the required data in table format?

Ashwini008
Builder

Hi ,

I wanted to know whether by clicking on the bar graph can we populate the different field values

For example i have bar graph showing the index name ,but when i drilldown on the bars i need to populate the sourcetype name associated with the index shown in the bar graph.

i have bar chart showing indexes . When i click on the  the bar's i want to display the sourcetype of the particural indexes. Now i am able to drilldown but i am not getting the required details i.e. source type.It is showing no results found since when clicked on the bar graph it takes the shown value .

 PFB CODE:

<drilldown>
<set token="indexname">$click.name2$</set>
</drilldown>

 

Query used in the second panel

index=* |search sourcetype="$indexname$"|table index sourcetype

Ashwini008_0-1607954654630.png

Any suggestions?

Labels (5)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Try using

<eval token="indexname">expression to convert $click.name2$ to sourcetype name</eval>
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Searching for a sourcetype name the same as the index name is unlikely to produce results.  Try this query.

| metadata index=$indexname$ type=sourcetypes | eval index=$indexname$ | table index sourcetype

 

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Prove Your Splunk Prowess at .conf25—No Prereqs Required!

Your Next Big Security Credential: No Prerequisites Needed We know you’ve got the skills, and now, earning the ...

Splunk Observability Cloud's AI Assistant in Action Series: Observability as Code

This is the sixth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Answers Content Calendar, July Edition I

Hello Community! Welcome to another month of Community Content Calendar series! For the month of July, we will ...