Splunk Search

Normalizing IBM log collector data into Splunk fields

johnward4
Communicator

I'm trying to monitor log data that is displayed below, and extract the fields into ones that can be used in Splunk

Nov 6 07:51:03 S10125BA QAUDJRN: [JS@0 event="JS-Actions that affect jobs" event_type="S-Start" sev="1" actual_type="JS-S" job_type="Subsystem monitor" job_sub_type="No subtype" chg_job="ALLSYL100" chg_user="QSYS" chg_job_no="866512" effective_user="QSYS" jobd_name="" jobd_library="" jobq_name="" jobq_library="" outq_name="*DEV" outq_library="" printer_device="PRT01" library_list="QSYS QSYS2 QHLPSYS QUSRSYS QGPL QTEMP" eff_group_prf="" supplemental="" jrn_seq="9863803" timestamp="20161106075103429000" job_name="ALLSYL100" user_name="QSYS" job_number="866512" eff_user="QSYS" logical_partition="001" admin_user="yes"]

The log should begin with JS@O event= The fields I'm Most interested in are :

JS@O event
event_type
actual_type
job_type
effective_user
timestamp
job_name
job_number
admin_user

I've tried using the Splunk field extractor but have had no luck pulling out the fields I need. Please help

0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi johnward4,
when you have in your logs a pair "field=value" Splunk automatically extract fieds and shows them in Relevant Fields, so you don't need to create a custom extraction using regex.
Probably in your case the first field has a wrong name because there is a space between "JS@O" and "event" and because "@" is a special character that cannot be used in field names, but anyway it should be read as "event".
If you don't have automatic extraction, you could use regexes like the following:

JS@0 event\=\"(?<event>[^\"]*)\"

Bye.
Giuseppe

View solution in original post

0 Karma

johnward4
Communicator

I'm trying to test the regex extraction as Splunk is not auto extracting the fields. I need to first regex the timestamp that begin the log in Nov 6 07:51:03 format.

Then cut and start the next extracted field beginning after [ and extract and create fields for each field=value pair. Ending at the closing ].

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi johnward4,
when you have in your logs a pair "field=value" Splunk automatically extract fieds and shows them in Relevant Fields, so you don't need to create a custom extraction using regex.
Probably in your case the first field has a wrong name because there is a space between "JS@O" and "event" and because "@" is a special character that cannot be used in field names, but anyway it should be read as "event".
If you don't have automatic extraction, you could use regexes like the following:

JS@0 event\=\"(?<event>[^\"]*)\"

Bye.
Giuseppe

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...

Customer success is front and center at .conf25

Hi Splunkers, If you are not able to be at .conf25 in person, you can still learn about all the latest news ...