Getting Data In

overriding sourcetype with sourcetype= in props.conf

alextsui
Path Finder

Hello, when using the following setup in props.conf, i was able to get the sourcetypes I want.

[source::/var/splunk/huaya-fs1/10010715/mitac_log-10010715.tar.gz:./wtmpx]
sourcetype = wtmpx

[source::/var/splunk/huaya-fs1/10010715/mitac_log-10010715.tar.gz:./messages]
sourcetype = messages

However, when I tried the setup below, sourcetype wtmpx showed, but messages files showed syslog as their sourcetype.

[source::/var/splunk/.../.../.../wtmpx]
sourcetype = wtmpx

[source::/var/splunk/.../.../.../messages]
sourcetype = messages

any ideas?

Splunk 4.1.1 on Linux 2.6 Kernel

thanks

1 Solution

gkanapathy
Splunk Employee
Splunk Employee

It's being overridden by a setting in $SPLUNK_HOME/etc/system/default/props.conf:

[source::.../messages(.\d+)?]
sourcetype = syslog 

You can override this by using:

[source::/var/splunk/*/*/*/messages]
sourcetype = messages
priority = 101

Note that you probably don't want multiple ... wildcards, since those expand to (in regex terms) .* (dot star), including / (slash), which means it will match files deeper than you appear to have wanted. * expands (in regex terms) to [^\\/]*, i.e., anything except a path separator.

View solution in original post

gkanapathy
Splunk Employee
Splunk Employee

It's being overridden by a setting in $SPLUNK_HOME/etc/system/default/props.conf:

[source::.../messages(.\d+)?]
sourcetype = syslog 

You can override this by using:

[source::/var/splunk/*/*/*/messages]
sourcetype = messages
priority = 101

Note that you probably don't want multiple ... wildcards, since those expand to (in regex terms) .* (dot star), including / (slash), which means it will match files deeper than you appear to have wanted. * expands (in regex terms) to [^\\/]*, i.e., anything except a path separator.

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