Splunk Search

Newb - Searching within account_name field of event log

bkeeley
Engager

Hi,

I am trying to search the windows security log for any logs where account_name field contains fire (case insensitive).

sourcetype="WinEventLog:Security" regex Account_Name="/(\w{1,20})?fire(\w{1,20})?/i"

I am using the above search, but it doesn't work. Yet there are accounts which have fire in the name such as Firetestadmin or bluefire123, and there are events for this search.

What am I doing wrong pls?

Thanks

Tags (1)
0 Karma
1 Solution

chris
Motivator

How about:

sourcetype="WinEventLog:Security"  | rex "(?i)Account Name:\s+(?<a_fire_account>.*fire.*)"

I recommend that you download the Splunk for Windows technology add-on:
http://splunk-base.splunk.com/apps/28933/splunk-for-windows-technology-add-on

It does field extractions in windows events for you (so you don't have to worry about rex to much)

Then you can search as follows:

sourcetype="WinEventLog:Security" Account_Name="*fire*"

View solution in original post

JSapienza
Contributor

Try this:

sourcetype="WinEventLog:Security" Account_Name="*fire*"
0 Karma

bkeeley
Engager

Thanks anyway 🙂

0 Karma

JSapienza
Contributor

Looks like chris beat me to it..

0 Karma

chris
Motivator

How about:

sourcetype="WinEventLog:Security"  | rex "(?i)Account Name:\s+(?<a_fire_account>.*fire.*)"

I recommend that you download the Splunk for Windows technology add-on:
http://splunk-base.splunk.com/apps/28933/splunk-for-windows-technology-add-on

It does field extractions in windows events for you (so you don't have to worry about rex to much)

Then you can search as follows:

sourcetype="WinEventLog:Security" Account_Name="*fire*"

bkeeley
Engager

Excellent - Thank you!

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...