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!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...