Getting Data In

How to rename sourcetype in props.conf?

SalimRahmani
Explorer

Hi,

After setting up a listen on UDP port (514) for syslog using inputs.conf, I tried to change the sourcetype from syslog (set in inputs.conf) to syslog_nf. Thus, i used the first method

props.conf
[source::udp:514]
sourcetype = syslog_nf

this doesn't change anything!
However, when I do:
[syslog]
rename = syslog_nf

the change happens! Does anyone have any idea about this?

0 Karma
1 Solution

strive
Influencer

Try this.

First define sourcetye in transforms.conf. Something like

[set_sourcetype_syslog_nf]
FORMAT = sourcetype::syslong_nf
DEST_KEY = MetaData:Sourcetype

Note: Check if you need any REGEX.

Then, in props.conf

[source::udp:514]  
TRANSFORMS-changesourcetype = set_sourcetype_syslog_nf

But, As somesoni2 commented, i would also suggest to set sourcetypes in inputs.conf

View solution in original post

strive
Influencer

Try this.

First define sourcetye in transforms.conf. Something like

[set_sourcetype_syslog_nf]
FORMAT = sourcetype::syslong_nf
DEST_KEY = MetaData:Sourcetype

Note: Check if you need any REGEX.

Then, in props.conf

[source::udp:514]  
TRANSFORMS-changesourcetype = set_sourcetype_syslog_nf

But, As somesoni2 commented, i would also suggest to set sourcetypes in inputs.conf

somesoni2
SplunkTrust
SplunkTrust

Try changing the sourcetype directly in inputs.conf. Its simpler than doing the same thing through props.conf.

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