Getting Data In

Help with setting index and sourcetype via transforms.conf

a212830
Champion

Hi,

I want to override the "unknown" index that some of my syslog messages are coming in as, using props and transforms. The index part is working, but the sourcetype is not setting. Not sure what I'm doing wrong... if someone can take a look, I'd appreciate it.

props.conf:
[unknown]
KV_MODE=auto
ANNOTATE_PUNCT=false
MAX_TIMESTAMP_LOOKAHEAD = 50
TRANSFORMS-set = ciscoIOS_index_parser,ciscoIOS_sourcetype_parser

transforms.conf:

[ciscoIOS_index_parser]
REGEX = %[A-Z_]+-[0-9]-[A-Z_]+:
DEST_KEY = _MetaData:Index
FORMAT = cisco

[ciscoIOS_sourcetype_parser]
REGEX = %[A-Z_]+-[0-9]-[A-Z_]+:
DEST_KEY = _MetaData:Sourcetype
FORMAT = sourcetype::cisco:ios
0 Karma

sloshburch
Splunk Employee
Splunk Employee
0 Karma

FrankVl
Ultra Champion

Should be DEST_KEY = MetaData:Sourcetype without the _.

See also: http://docs.splunk.com/Documentation/Splunk/latest/Admin/Transformsconf#KEYS:

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...