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!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...