All Apps and Add-ons

getting an error while doing field extraction for the logs via syslog

markcomlinks
New Member

Good morning Team
i am quite new in splunk and am stuck here currently

trying to extract fields for following strings sourcetype is syslog (The extraction failed. If you are extracting multiple fields, try removing one or more fields. Start with extractions that are embedded within longer text strings.)
MN category\Source: Local databases\r\nRule\Category: TEST CAtegory\r\nRule\Rule type: Test\r\n

field to be selected

MN Category\Source local database
Rule\Category TEST category
Rule\Rule Type: Test

Thank you in advance

Tags (1)
0 Karma

micahkemp
Champion

It looks like each key/value pair is on its own line, and the keys are separated from the values by a :. This may be a valid regex to use in transforms.conf to extract the key/value pairs together:

[colon_separated_key_value]
REGEX = ^(?<_KEY_1>[^:]+):\s*(?<_VAL_1>.*)$

And in props.conf:

[syslog]
REPORT-colon_separated_key_value = colon_separated_key_value

Check out the transforms.conf and props.conf documentation for more information.

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!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

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