Splunk Search

How add stats table to each row in a stats table

rkishoreqa
Communicator

I built a dashboard to view the stats count of applications with the below query.

Query : index="bw6_stg" ErrorReport| rex field=_raw "ApplicationName:\s+\[(?P<Applname>.*)];" | rex field=_raw "jobId: (?<jId>\w+);" |dedup jId |stats count by Applname

For the above query below are the results.

Applname       Error count
abcd                     5
abcd.app            6
efgh                     4
efgh.app            3


Now my requirement is to add stats count of errors for each application this stats table like as below.
When I click on the 1st application, it should show us like below.

Applname       Error count
abcd                     5
     Error1                  2
     Error2                  1
     Error3                   2

 

When I click on the 2nd application, it should show us like below.

Applname       Error count
abcd .app                    6
     Error1                  2
     Error2                  2
     Error3                   2

 

can you anyone please help me on this, Thanks in advance

Labels (1)
0 Karma
1 Solution

nickhills
Ultra Champion

Use $row.<fieldname>$ in your drilldown.

In your case that is probably something like $row.ApplName$

See https://docs.splunk.com/Documentation/Splunk/8.1.0/Viz/PanelreferenceforSimplifiedXML#Predefined_dri...

If my comment helps, please give it a thumbs up!

View solution in original post

nickhills
Ultra Champion

Use $row.<fieldname>$ in your drilldown.

In your case that is probably something like $row.ApplName$

See https://docs.splunk.com/Documentation/Splunk/8.1.0/Viz/PanelreferenceforSimplifiedXML#Predefined_dri...

If my comment helps, please give it a thumbs up!

rkishoreqa
Communicator

The second panel needs to get application name from 1st panel, what we selected.

0 Karma

rkishoreqa
Communicator

My requirement is to display stats count table on ApplicationName and when I clicked on the ApplicationName it should display Errors count as stats count table.

Applname       Error count
abcd                     5
     Error1                  2
     Error2                  1
     Error3                   2

abcd .app                    6
     Error1                  2
     Error2                  2
     Error3                   2

0 Karma

nickhills
Ultra Champion

Is your question:

"what should the search string be for the second panel?"

or is it:

"how do i make a click in one panel affect the contents of another panel?"

If you want to know how to make another panel appear and be driven by the click see this answer:

https://community.splunk.com/t5/Splunk-Search/Can-you-display-a-panel-only-if-the-user-clicks-on-one...

If my comment helps, please give it a thumbs up!
0 Karma

rkishoreqa
Communicator

The second panel needs to get application name from 1st panel, what we selected.

My requirement is to display stats count table on ApplicationName and when I clicked on the ApplicationName it should display Errors count as stats count table.

Applname       Error count
abcd                     5
     Error1                  2
     Error2                  1
     Error3                   2

abcd .app                    6
     Error1                  2
     Error2                  2
     Error3                   2

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

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

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...