Getting Data In

How can I fix logs delay due to timezone difference in the UF server?

sekhar463
Path Finder

Hi All i have a log source in the server timezone is in CST and logs are coming into the server as UTC time zone logs.

so while ingesting logs splunk was ingesting based on CST which is 5 hours before logs.

i have added props config for UTC but still getting the issue.

please let us know what needs to be done

Labels (4)
0 Karma

PickleRick
SplunkTrust
SplunkTrust

There can be many things that went wrong and you're not providing too much information 😉

@isoutamowas a tiny bit imprecise saying that splunk uses UTC internally. Actually splunk internally stores _time as a "unix timestamp" which just points to a given point in time and can be rendered to a human-readable time string in any timezone. In order to do so Splunk has to parse the human readable (or not) timestamp from the event.

So the problem with event's time can be in three separate places (in each of them or even if all three of them at the same time).

1. The source logs can have wrong timestamp (happens with badly configured source - for example, if someone configured a device to store local time but report it as UTC)

2. The log is wrongly parsed due to misconfiguration (or if there was no explicit configuration at all and Splunk's "guess" as to the timestamp format turns out to be wrong).

2a. There is no timezone information present in the event and splunk applies wrong TZ to the timesamp.

3. The user's timezone is misconfigured in preferences and the timestamp is wrongly rendered in the webui.

So depending on what is the problem, there should be proper fix

1. Configure source properly

2. Apply time extraction configuration on the indexers (or HFs if you have them) - in a typical example

2a. Add TZ definition for a given sourcetype/source/host - this can be a bit more tricky than what @diogofgm showed if you have multiple event sources from one host - each with different TZ

3. Change your user's preferences.

diogofgm
SplunkTrust
SplunkTrust

You can create a stanza in props.conf with:

[host::<host>]
TZ=<TZ>

 

------------
Hope I was able to help you. If so, some karma would be appreciated.
0 Karma

sekhar463
Path Finder

i have already added props file with sourcetype but didnt fixed.

 

[netapp:cloudsecure:agentlog]
TZ = UTC

0 Karma

PickleRick
SplunkTrust
SplunkTrust

But on which component did you put that setting?

0 Karma

sekhar463
Path Finder

i have added props.conf in the Deployment server for the specific app to update in the UF 

0 Karma

PickleRick
SplunkTrust
SplunkTrust

And that's why it's not working 🙂

UF is not a parsing component. UF just picks up data, splits it up into chunks and sends to indexer(s) or intermediate forwarder(s). You need that setting on your parsing components (indexers or heavy forwarders) in the path of your events.

0 Karma

sekhar463
Path Finder

hai,

i have added props.conf file in Heavy forwarders but getting duplicate events for one log which is as CST and UTC check below 
please let me know anything need to add.



0 Karma

PickleRick
SplunkTrust
SplunkTrust

These are two separate events with two distinct timestamps (other than that they do indeed seem identical).

Since they are 5 hours apart, they probably got ingested via two separate "routes". We don't know your environment and don't know your event routing.

0 Karma

sekhar463
Path Finder

we have multiple HF"S.

do we need to add props file for this in all of those HF ?

and also how we can add is it by creating new app in the HF 

0 Karma

isoutamo
SplunkTrust
SplunkTrust

You must add props.conf & transforms.conf into first full Splunk Enterprise instance on path from source system to indexers. If you have several HF on same level/layer where UF are connecting then add those to all of them. Also remember restart splunk on those instances.

0 Karma

sekhar463
Path Finder

what was the configuration based on my  sourcetype = netapp:cloudsecure:agentlog 

i have already added props file as mentioned in eariler is anything need to add 

transform config file also required here.

 

 

0 Karma

isoutamo
SplunkTrust
SplunkTrust

Hi

Splunk use internally UTC for all times. When you are ingesting event splunk automatically change it's time to UTC based on your source system timezone and if it cannot determine it when events are collected then it use indexers time zone. When you are searching then it's use your web browser's time zone unless you haven't separately defined it in your Splunk's User preferences.

If your serves (UF etc) haven't correct TZ information and time is not in sync, you should fix this. Another option is use conf files on UF and Indexer/HF side to fix this issue.

More about timezone handling in splunk https://docs.splunk.com/Documentation/Splunk/latest/Search/Abouttimezones

r. Ismo

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...