Getting Data In

props.conf and syslog

trumpjk
Explorer

I have an entry in props.conf for TZ conversion i.e:

[host::SOMEHOST]
TZ = UTC

If the host is running the universal forwarder the splunk indexer with handle the conversion and display entry using local time.

If I forward logs from host via syslog the indexer does not do the time conversion.

Any suggestions?

0 Karma

emiller42
Motivator

So I'm interpreting this as two separate configurations:

Configuration 1:

  • Forwarder on external host, forwarding to Splunk indexer.
  • Splunk indexer has props.conf stanza for that host name with a TZ setting.

Configuration 2

  • Syslog on external host sending lines to indexer.
  • Indexer is monitoring syslog locally to index lines.
  • Same props.conf stanza as above.

In the second configuration, the props.conf stanza won't apply as it's specifying the remote host, while the syslog data is being monitored locally (and thus would have the indexer as the host)

In the second scenario, I would recommend using sourcetype or source stanzas to apply the TZ setting, not host. As setting it for the indexer would apply the TZ setting to everything indexed locally. (Including _internal logs) Instead, create a source stanza or sourcetype stanza. (Whichever is most appropriate) and use that.

[source::syslog]
TZ = UTC

if your source name is different, then change accordingly.

trumpjk
Explorer

I was able to add a template to the syslog-ng.conf file to modify date/time stamp to include timezone offset. This solved my problem. Thanks for your help.

0 Karma

emiller42
Motivator

see the following link for an example of using transforms on syslog data:

http://splunk-base.splunk.com/answers/60972/split-syslog-input-into-multiple-indexes

0 Karma

emiller42
Motivator

That makes things more complicated. You're going to want to use a transform to get the appropriate host values out of the individual log lines, then host:: stanzas with the relevant TZ settings. However, I'm not sure if this can be done in one props.conf, or if a heavy forwarder is needed. (HF does the transform portion before forwarding to the indexer)

Can't syslog-ng include timezone in the timestamp of the logs? That would take care of things too. (Although that might not be something you control)

0 Karma

trumpjk
Explorer

To clarify: I edited the props.conf on the indexer. The remote host(s) is forwarding syslog to indexer via syslog-ng. Indexer is receiving logs. I have over 200 systems forwarding via syslog and not all are using same TZ. SOme are EST and some are GMT

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

From Data to Insight: Announcing the Winners of the Splunk Dashboard Contest

Hi Splunkers, First off, thank you to everyone who participated in our very first From Data to Insight: The ...

Splunk Developers: Construct Your Future at the .conf26 Builder Bar

Calling all Splunk architects, platform admins, and app developers: the site is open, and the blueprints are ...

Quick connection discovery mode for forwarders

When a Splunk forwarder loses connectivity to its indexers, it does not always reconnect immediately. In many ...