-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logs display incorrect #27485
Comments
I can confirm this issue on Wazuh 4.9.2 (Dashboard, Manager, Indexer on seperated machines - OS: Ubuntu24.04) and a Allonone-Wazuh-Server 4.7.4 (OS: Ubuntu 22.04). Dashbord and Management server shows the same time and time zone: wazdash1:~$ timedatectl wazmasterman:~$ timedatectl The ossec.log on the Wazuh Managament server shows the correct time: 2025/01/08 15:35:29 wazuh-modulesd:vulnerability-scanner: INFO: Vulnerability scanner module started. But the WUI log viewer shows the time plus one hour in the future: Timezone for date formatting on the WUI is configured with browser: I changed this value to Europe/Berlin but it did not fix the problem. |
For a tool where the timestamp is very important getting wrong data displayed is not good So I'm not alone :-D |
AnalysisThe
I was doing some tests:
Wazuh server timezone: UTC0 and
|
ResearchAdding to the investigation, the API returns the information with the manager's local date but falsifies the time zone, causing the dashboard, when trying to format the date to the corresponding time zone, to reformat it based on the date returned by the manager. In these code snippets, the mentioned behavior can be observed:
Here it mentions that the timestamp is sent in UTC format (referring to +0) and formatted according to this DATE_FORMAT value: The timezone is not included.
This is where the timezone is replaced, but the date remains based on the local timezone, not UTC +0.
In the dashboard repository, we added the date formatting as expected. By doing this, the date is formatted twice: first by the API and then by the Dashboard.
A possible solution would be to include the time zone formatting value or the actual UTC+0 value in the API response. |
UpdateConverted the timestamps to UTC so the dashboard receives them always in the same timezone. |
UpdateTested the changes using a timezone in |
The time on my Wazuh server:
The setting on the Dashboard server (colocated on the same Wazuh server):
And the time of the logs on the dashboard server:
the time is clearly incorrect in this view: Server management > Logs. --> It show time in the future for log should be in the past....
Many thanks for resolving this issue this look like and old behavior: Logger displaying incorrect time #12679
#timezone #Dashboard #Logs
The text was updated successfully, but these errors were encountered: