Getting Data In

I want to set a different "time zone" from the "time zone" in the log.

yutaka1005
Builder

If there is a log like below that have time zone "+00:00", how can I set different time zone?

2018/5/9 3:00:00+00:00 this is test

If I input this log, system time zone of my splunk server is JST and difference of UTC and JST is +9 hours, so normally _time will be 2018/5/9 12:00:00.

But I want splunk to recognize this log's time zone is JST, so I configured TZ = Asia/Tokyo in props.conf of HF.
*In my environment there are HF and Indexer

Then I was thinking that _time would be 2018/5/9 3:00:00, but _time wasn't changed.

Did I set TZ in wrong place?
Or if the time zone is described in the log, does it override the TZ setting and there is no way to avoid it?

Please someone tell me about it.

0 Karma
1 Solution

xpac
SplunkTrust
SplunkTrust

Hey,

If there's a timezone in the timestamp, it will override whatever is being set in TZ.
Therefore, you have two options:
- Manually configure the timestamp recognition, and do NOT include the timezone part in the TIME_FORMAT setting, so it should work with your example and %Y/%m/%d %H:%M:%S
- If this is syslog, you can have that log timestamp just being rewritten with a proper timestamp, and let Splunk just do it's thing. I've done it with syslog-ng before, you can read about it here: https://spice.areafunky.net/2017/07/08/bye-rsyslogd-here-comes-syslog-ng-fixing-timestamps-without-t...

Hope that helps - if it does I'd be happy if you would upvote/accept this answer, so others could profit from it. 🙂

View solution in original post

Get Updates on the Splunk Community!

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

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...