Splunk Search

Add certain feilds to an existing query to filter the count

bapun18
Communicator

Below is my existing query :

bapun18_0-1597737180744.png

i want to add ceratin common feilds with different value for the respective indexes .How can i add and get the filter count of events .Please help me in tuning the query ASAP

here's attaching the different feilds for respective indexes  :

 

bapun18_1-1597737550135.png

 

Labels (1)
0 Karma

FrankVl
Ultra Champion

It's not very clear to me what you are asking for to be honest.

If you want to apply similar filters to your tstats query like you are showing in your second screenshot, take a look at the PREFIX(), CASE() and TERM() directives you can use in the tstats command:

https://docs.splunk.com/Documentation/Splunk/8.0.5/SearchReference/Tstats#Use_PREFIX.28.29_to_aggreg...

http://docs.splunk.com/Documentation/Splunk/8.0.5/Search/UseCASEandTERMtomatchphrases

Note: PREFIX() is only available since Splunk 8

0 Karma

bapun18
Communicator

Please ignore the |search xxxxx line below eval command line.

was trying something forgot to remove that

 

0 Karma
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk, and empower your SOC to reach new heights! Duration: 1 hour  Prepare to ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...