Knowledge Management

Correct count of events

strawberry28
Explorer

source="http:Emerson_P1CDN"
| spath host
| spath client_ip
| spath status_code | where status_code=200
| spath referer | where referer=""
| spath path | search path NOT ("*wcsextendedsearch" OR "*EmersonSKUListingView" OR "*EmersonProductListingView" OR "*CartRefreshStatusJSON" OR "*PriceAjaxView" OR "*AjaxSerialNumber" OR "*UnsupportedBrowserErrorView" OR "*LogonForm"OR "*MiniCart" OR "*MiniShopCartDisplayView" OR "*AnalyticsPageView" OR "*AjaxAccountLinkDisplay" OR "*.css" OR "*.js" OR "*.woff2" OR "*.woff" OR "*.gif" OR "*.png" OR "*.jpg" OR "*.ico" OR "*.pdf" OR "*.html" OR "*.txt" OR "*.xml" OR "*/ClickInfo" OR "*thumb")
| bin _time span=1m
| stats count by _time,host,path,client_ip | where count >= 100 | sort - count

Does the query at the top is correct?, because we want to count the total events of _time,host,path and client_ip per minute

Labels (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Yes, stats will count the events which match the unique combinations of those fields

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You might want to consider

| spath referer | where referer="" OR isnull(referer)
0 Karma

strawberry28
Explorer

I will, but is it looks good? does the stats count. count the events?
thanks

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Yes, stats will count the events which match the unique combinations of those fields

0 Karma

strawberry28
Explorer

Thank you so much!

0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...