Splunk Search

How To Change Fix Field Value

dbray_sd
Path Finder

We are pulling in mysql_query events from a freeradius server however one of the field values has an or "|" in it, so Splunk is ignoring the correct next value. Here is the log entry:

acctinputoctets = '0'         << 32 |                                        '442929',                       acctoutputoctets =               '0' <<      32        | '7920416'

Splunk is pulling only the '0' for the values. We need it to ignore the: '0' << 32 |

How do we update the field values so that the correct value is indexed?

Tags (2)
0 Karma
1 Solution

lguinn2
Legend

Instead of using automatic field extraction, you will probably need to specify the fields. You can do this

props.conf

[yoursourcetype]
REPORT-fe=extract_fields

transforms.conf

[extract_fields]
FORMAT = $1::$2
REGEX = (\w+)\s*\=.*?\|\s*'(.*?)'

You may need to add

KV_MODE = none

to props.conf, but it would be better if you didn't need it.

View solution in original post

0 Karma

lguinn2
Legend

Instead of using automatic field extraction, you will probably need to specify the fields. You can do this

props.conf

[yoursourcetype]
REPORT-fe=extract_fields

transforms.conf

[extract_fields]
FORMAT = $1::$2
REGEX = (\w+)\s*\=.*?\|\s*'(.*?)'

You may need to add

KV_MODE = none

to props.conf, but it would be better if you didn't need it.

0 Karma

somesoni2
Revered Legend

How are you ingesting data? using DB Connect OR file monitoring?? Looks like you got some prefix with field value, which you can correct before indexing (for new events only) OR use Field extraction to ignore in the field value.

0 Karma

dbray_sd
Path Finder

We are using the Splunk Universal Forwarder to pull in /var/log/mysql/mysql_query.log

0 Karma
Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...