Splunk Search

How to exclude from stats

chuckeelos
New Member

Hello,

I'm trying to exclude the results that I obtain from this search. Essentially, this yields all bots hitting my web server. Now I'm trying to exclude this results so it shows me, hopefully, all human hits. I've been trying to do | stats count (eval(NOT match . . . , but I cannot for the life of me figure it out. Thanks!

sourcetype="access_combined" host="www7*"
| eval usersession=clientip + "_" + useragent
| sort usersession, _time | delta _time as visit_pause p=1
| streamstats current=f window=1 global=f last(usersession) as previous_usersession
| eval visit_pause=if(usersession==previous_usersession, visit_pause, -1) | search visit_pause!=-1

Labels (1)
Tags (1)
0 Karma

chuckeelos
New Member

Unless the answer is to use: 

| eval visit_pause=if(usersession==previous_usersession, visit_pause, -1) | search NOT visit_pause!=-1

0 Karma
Get Updates on the Splunk Community!

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...