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!

Splunk Observability Cloud's AI Assistant in Action Series: Auditing Compliance and ...

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

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

What You Read The Most: Splunk Lantern’s Most Popular Articles!

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...