Getting Data In

What is the order of precedence when there are conflicting configs (such as timezone) at the sourcetype, host and source level?

anandhim
Path Finder

What is the order of precedence when there is conflicting configurations (such as timezone) at sourcetype, host and source level?

0 Karma
1 Solution

MuS
SplunkTrust
SplunkTrust

Hi anandhim,

you can find all the details on config file precedences here in the docs http://docs.splunk.com/Documentation/Splunk/6.2.2/Admin/Wheretofindtheconfigurationfiles

Hope this helps ...

cheers, MuS

View solution in original post

jchampagne_splu
Splunk Employee
Splunk Employee

The order of precedence when processing stanzas in props.conf is:

  1. source
  2. host
  3. sourcetype

As noted here: http://docs.splunk.com/Documentation/Splunk/6.2.2/Admin/Propsconf

**[<spec>] stanza precedence:**

For settings that are specified in multiple categories of matching [<spec>] stanzas,
[host::<host>] settings override [<sourcetype>] settings. Additionally,
[source::<source>] settings override both [host::<host>] and
[<sourcetype>] settings.

Consider the following example:
The Universal Forwarder is installed on my_server01 and reading opt/myapp/system.log (source) and tagging it with a sourcetype of system_traffic.

We have 3 different props.conf files across 3 apps in our $splunk_home/etc/apps folder

$splunk_home/etc/apps/my_app1/default/props.conf:

[system_traffic]
TZ=UTC

$splunk_home/etc/apps/my_app2/default/props.conf:

[source::opt/myapp/system.log]
TZ=America/Los_Angeles

$splunk_home/etc/apps/my_app3/default/props.conf:

[host::my_server01]
TZ=America/New_York

Our resulting TZ for opt/myapp/system.log on my_server01 would be: TZ=America/Los_Angeles because the source stanza overrides both the host and the sourcetype stanzas.

MuS
SplunkTrust
SplunkTrust

nice answer!

0 Karma

MuS
SplunkTrust
SplunkTrust

Hi anandhim,

you can find all the details on config file precedences here in the docs http://docs.splunk.com/Documentation/Splunk/6.2.2/Admin/Wheretofindtheconfigurationfiles

Hope this helps ...

cheers, MuS

anandhim
Path Finder

Thanks .The information I needed was not on that page directly but a link to the page which contains the answer was present: http://docs.splunk.com/Documentation/Splunk/6.2.2/admin/Attributeprecedencewithinafile

Cheers

Get Updates on the Splunk Community!

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

  Ready to master Kubernetes and cloud monitoring like the pros?Join Splunk’s Growth Engineering team for an ...

Wrapping Up Cybersecurity Awareness Month

October might be wrapping up, but for Splunk Education, cybersecurity awareness never goes out of season. ...

🌟 From Audit Chaos to Clarity: Welcoming Audit Trail v2

&#x1f5e3; You Spoke, We Listened  Audit Trail v2 wasn’t written in isolation—it was shaped by your voices.  In ...