Splunk Search

Need to add Additional panel with total?

renuka
Path Finder

renuka_0-1622614174709.png

Hello 

"Good Day"

I am trying to add the extra column for totals. If you observe above picture, I have four counts  of domain and now i need one more column which gives sum of all the above columns and it should be seen in dashboard

renuka_2-1622615068597.png

I need to get output of field domain in this form
Can you please help me to find the solutions.

Labels (1)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @renuka,

You have to create a Post Process Search containing your full search (without addcoltotals).

e.g.:

...
| stats count BY CRS_Domain

and in each panel call the base search adding an additional search filtering in each panel put a final filter, e.g. if your base search is called "basesearch", in the "V&V" panel you'll have:

<search base="basesearch">
     <query>
          | search CRS_Domain="V&V"
          | table count
     </query>
</search>

instead in the last panle (total), you have to add:

<search base="basesearch">
     <query>
          | addcoltotals labelfield=CRS_Domain label="Total"
          | search sourcetype=Total
          | table count
     </query>
</search>

If you want to better understand how Post process Search works see at https://docs.splunk.com/Documentation/Splunk/8.2.0/Viz/Savedsearches#Post-process_searches_2 or see the Splunk Dashboard Examples App (https://splunkbase.splunk.com/app/1603/).

Ciao.

Giuseppe

View solution in original post

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @renuka,

the searches of the panels, are similar or all different?

because it isn't possible to pass a token from a panel to another without drilldown,

so in the total panel you have to use a search that gives all the values to sum.

So if they are similar, you could create a post process search and put in each panel the value.

Ciao.

Giuseppe

0 Karma

renuka
Path Finder

@gcusello 
 They are similar

renuka_0-1622620398846.png

 I tried adding addcoltotals which actually giving me the sum of all the above but  in visualizaton i couldn't display all four value count and total

 

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @renuka,

You have to create a Post Process Search containing your full search (without addcoltotals).

e.g.:

...
| stats count BY CRS_Domain

and in each panel call the base search adding an additional search filtering in each panel put a final filter, e.g. if your base search is called "basesearch", in the "V&V" panel you'll have:

<search base="basesearch">
     <query>
          | search CRS_Domain="V&V"
          | table count
     </query>
</search>

instead in the last panle (total), you have to add:

<search base="basesearch">
     <query>
          | addcoltotals labelfield=CRS_Domain label="Total"
          | search sourcetype=Total
          | table count
     </query>
</search>

If you want to better understand how Post process Search works see at https://docs.splunk.com/Documentation/Splunk/8.2.0/Viz/Savedsearches#Post-process_searches_2 or see the Splunk Dashboard Examples App (https://splunkbase.splunk.com/app/1603/).

Ciao.

Giuseppe

0 Karma

renuka
Path Finder

@gcusello 

Thank you for helping

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @renuka,

good for you, see next time!

Ciao and happy splunking.

Giuseppe

P.S.: Karma Points are appreciated 😉

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

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...