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
Get Updates on the Splunk Community!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...