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!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...