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!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

 (view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...