Getting Data In

Complicated extraction in props.conf

cpeteman
Contributor

The jist of the search is that it removes lots of infomation from _raw and gives me back whats left AS msgdigest.

index=auth |rex mode=sed "s/[a-z]+\d{1,4}//" |rex mode=sed "s/user\s[a-z]+/user /" |rex mode=sed "s/(user|USER)=[a-z]+/user=/" |rex mode=sed "s/\d+//g" |rex mode=sed "s/(Jan|January|Feb|Febuary|Mar|March|Apr|April|May|Jun|June|Jul|July|Aug|August|Sep|September|Oct|October|Nov|November|Dec|December|Mon|Tue|Wed|Thu|Fri|Sat|Sun|PM|AM|PDT|PST)//g" |rex mode=sed "s/\s+/_/g"| rename _raw AS msgdigest |stats count by msgdigest

I want to find a way to make this work in prop.conf (or if I have to also using transforms.conf). Appreciate the help!!!!

Tags (2)
0 Karma

kristian_kolb
Ultra Champion

If you wish to do this at index time, and permanently remove the data before it's even written to an index, you can use SEDCMD in props.conf.

http://docs.splunk.com/Documentation/Splunk/5.0.4/Admin/Propsconf

However, I don't think you should remove any timestamps.

Hope this helps,

Krisitian

0 Karma

cpeteman
Contributor

The goal is not to remove permanently (you are right in thinking that would be bad 😉 but instead to have a new field without the parts I took out from _raw.

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