Getting Data In

Splunk logs visible after 5hrs:30 mins in splunk UI- What could be wrong here?

Yashprime07
Explorer

Splunk logs visible after 5hrs:30 mins in splunk UI for example , if I have to see the log of 13:00 to 14:00 , in UI I have to check for 18:00 to 19:00 .

Here splunk forwarder docker container works as a sidecar container alongside application container with same source volume mounted to both of the containers .

 

 

Can someone help what could be wrong here ??

 

0 Karma

Yashprime07
Explorer

Thanks @PickleRick @isoutamo @ITWhisperer , the issue was that source type was not specified for this monitor, which breakdowns the events and adds the timezone IST to the events

0 Karma

VatsalJagani
SplunkTrust
SplunkTrust

@Yashprime07 - Is your question resolved? If so, kindly accept the answer by clicking on "Accept as Solution" button below the helpful answer.

 

Splunk Community Moderator,

Vatsal

0 Karma

PickleRick
SplunkTrust
SplunkTrust

Somewhere in this setup you have a misconfigured timezone.

First thing to do would be to check what timestamp is really produced by your source. See what timestamp is in the raw event - is it your local timestamp or maybe it's UTC? Does it include timezone information?

Yashprime07
Explorer

Could this help ? @PickleRick @ITWhisperer 

0 Karma

PickleRick
SplunkTrust
SplunkTrust

OK. Apart from one more thing which might be interfering here - what is your user's timezone configured in splunk's webui in your account's preferences?

Anyway, since your sourcetype shows as "auth-too_small" it means that your logs onboarding is not properly configured.

So first things first:

1) Make sure what timestamps your data source produces (in your case - the app). I see "13:09" but what timezone is it in? UTC? Your local TZ? Unfortunately, the timestamp does not - as far as I can see - provide any notion of timezone which is not the best practice. Usually for clarity you'd want to either emit a timestamp containing TZ declaration or at least make sure that data is consistently reported in UTC (you could use local timezone but it might lead to problems with daylight saving if your TZ uses it)

2) Configure the forwarder and receiving indexer accordingly for the sourcetype - configure time recognition parameters - prefix, format, timezone if needed.

Yashprime07
Explorer

Also, 
         Checked account preference for timezone, it's this  -

(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi

 

0 Karma

Yashprime07
Explorer

1) It's sending in IST 
2) But I could see _time being 5hrs:30mins greater than the event timestamp, will check these forwarder parameters for that source. But currently it looks like this -

[monitor:///var/log/auth/app]
index = auth-signedcall
_meta = stack::<stackname>

 

0 Karma

isoutamo
SplunkTrust
SplunkTrust

Hi

As @PickleRick said your sourcetype hasn't onboarded correctly. Actually you have just add log file for collection, but You haven't define anything else for it.

You should add sourcetype into your inputs.conf and then with it add needed definitions on your 1st full Splunk Enterprise instance from docker container to indexers. That could be a heavy forwarder or indexer. Ad base sourcetype definitions under [<your sourcetype>] and then e.g. TZ definitions under [host::<your hosts which are in IST TZ>]

Those should fix your issue. But as PickleRick said, there could be still TZ issue when summer time changed to normal time and vice versa. So please check it also after that time.

r. Ismo

Yashprime07
Explorer

Also, 
         we added this part in the application code's Dockerfile  too -

ENV TZ=Asia/Calcutta
RUN ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime && echo ${TZ} > /etc/timezone
0 Karma

Yashprime07
Explorer

Inside the container I get this -

bash-4.2# date
Mon Jun 26 12:54:44 IST 2023
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Could it be a timezone setting mismatch?

Get Updates on the Splunk Community!

What the End of Support for Splunk Add-on Builder Means for You

Hello Splunk Community! We want to share an important update regarding the future of the Splunk Add-on Builder ...

Solve, Learn, Repeat: New Puzzle Channel Now Live

Welcome to the Splunk Puzzle PlaygroundIf you are anything like me, you love to solve problems, and what ...

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...