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

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...