Splunk Search

How can I search to show when consecutive events occur/ specific patterns apply?

nnimbe
Path Finder

Hi All,

I need the command for consecutive events which is triggered one after another out of multiple events( 3 consecutive events from 100 events)

for example if we receive any hits from external IP towards our web-server as accept,accept, deny or deny, deny accept or in windows if we receive the account successfully login, account created, change password attempt etc

The goal to get three or more consecutive events generated one after another out of 100 logs to identify specific pattern

Can anyone please help with Splunk command to achieve the same

0 Karma

nnimbe
Path Finder

Thanks @cusello, meanwhile | transaction startswith="logfail" endswith="login" will provide you the starting and ending event but if i want to capture three or four consecutive events as stated above, for exmaple accept,accept,deny or login,changepassword,logout then whether any command to achieve this, that's my query

if we use transaction command on first and last event we don't have control over the inbetween events and there is a chance it may vary with actual events which we are looking for

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi nnimbe,
try with transaction (isn't very performant!):

your_search
| transaction startswith="logfail" endswith="login"
| where eventcount> 5

obviously startswith and endswith must be customized for your searches and eventcount is the threeshold level that you like.
Bye.
Giuseppe

0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

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 ...