Alerting

How to correlate Windows security logs in indexA with IN/OUT status of users in indexB and alert if a user logs in to their workstation with an OUT status?

cbr654
Path Finder

Hello,

I ready thru some documentation, but I need a nudge in the right direction. I have an index that has information on when a user is IN or OUT of the office. I would like to be alerted when someone logs into their workstation when the are OUT of the office. My Windows security logs are in a different index than my logs that contain IN/OUT status. I am a bit confused on if I should begin with "transaction" or subsearches. Any help will be appreciated. Thanks

0 Karma

woodcock
Esteemed Legend

I would use streamstats like this:

(index=A other filters to get IN/OUT time) OR (index=B other filter to get Windows sercurity logs) | reverse | streamstats current=t latest(userStatusFieldThatIsEitherInOrOut) AS lastStatus by userIdField | where lastStatus="Out" AND EventCode="LoginCode"
0 Karma

somesoni2
Revered Legend

See the transaction command herer
http://docs.splunk.com/Documentation/Splunk/6.3.0/SearchReference/Transaction

What you need (IMO) is that find events grouping (transactions) which will start when user is out of office and ends when someone logs in the work station. You can correlate both the logs (in different index) like this

(index=A other filters to get IN/OUT time) OR (index=B other filter to get Windows sercurity logs) | transaction YourCommondField startswith="condition for OUT" endswith="condition for someone logged in"
0 Karma

cbr654
Path Finder

thank you. Let me try to get this working. I will report back

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...