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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...