Getting Data In

set host value based on event

tuxford
Path Finder

Hello

I'm trying to set host based on value in an event, but it uses the default value and I'm trying to figure out why that is. My config looks like this:

transforms.conf

[janus]
DEST_KEY=MetaData:Host
REGEX=((?<=\d\d:\d\d:\d\d\s)[\w-\.]+)
FORMAT=host::$1

props.conf

[source::/var/log/syslog_vpn]
TRANSFORMS-janus=janus
SHOULD_LINEMERGE=false
sourcetype=vpn

[source::/var/log/syslog_info]
TRANSFORMS-janus=janus
SHOULD_LINEMERGE=false
sourcetype=ciscone

inputs.conf

[monitor:///var/log/syslog_info]
index=test

[monitor:///var/log/syslog_vpn]
index=test

I know my regex works since I've tested it with this rex in my search that replaces all the hostnames within the event to XXX: rex mode=sed "s/((?<=\d\d:\d\d:\d\d\s)[\w-\.]+)/XXX/g"

Tags (2)
0 Karma

tuxford
Path Finder

So I finally figured it out, the config that I tried were put on the universal forwarder and was not honored, when put on the indexer it was all good.

MuS
SplunkTrust
SplunkTrust

Hi tuxford, without tweaking the UF ignores props.conf and transforms.conf. Good you figured it out 😉

0 Karma
Get Updates on the Splunk Community!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...