Splunk Search

Search to filter data

raghu0463
Explorer

Hi, Can I write my search as:

index=idx1 host != (a,b,c) | stats count by host

The thing is I want to filter some of the hosts in the count.

0 Karma
1 Solution

woodcock
Esteemed Legend

You can do this:

index="idx1" AND NOT host IN("a","b","c")
| stats count by host

View solution in original post

woodcock
Esteemed Legend

You can do this:

index="idx1" AND NOT host IN("a","b","c")
| stats count by host
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...