Hi to All,
Is there an option to get time CET time in email notifications ?
Best regards
Hi to All,
Is there an option to get time CET time in email notifications ?
Best regards
AFAIK, it depends on the timezone configured on your Checkmk monitoring server. Below are the environment variables which get this information and show in the notification:
Hmm. I went through the complete list of variables. Have not found any entry to change timezone
What’s the timezone on your Linux host on which you installed Checkmk?
I run checkmk as a docker image on my Synology NAS.
root@NAS01:~# date
Sat Jan 16 13:29:33 CET 2021
Is the timezone also set correctly inside the container?
H Andreas,
I have not found within Synology NAS docker package any option to set the time zone.
The checkmk container is runnig with the wrong time:
root@checkmk-check-mk-raw2:/# date
Sun Jan 17 12:14:18 UTC 2021
while it is Sun Jan 17 13:14:18 CET 2021 on my NAS.
BUT … You made me look in to the correct direction
In checkmk docker container I have added variable TZ with value Europe/Warsaw and voila:
root@checkmk-check-mk-raw2:/# date
Sun Jan 17 13:46:31 CET 2021
BUT in email notifications there is still UTC time given
WTF ??!!
If you cannot or do not want to change the timezone of the monitoring server you can set a timezone within each checkmk instance.
Use the config file $OMD_ROOT/etc/environment
for that. Set the variable TZ=UTC
there and restart the instance.
Hi,
I am affraid I do not understand Your advice. Synology NAS and docker container are running with CET zone.
Synology NAS:
root@NAS01:~# date
Mon Jan 18 09:22:16 CET 2021
checkmk docker terminal:
root@checkmk-check-mk-raw2:/# date
Mon Jan 18 09:27:44 CET 2021
Timezone set with container variables:
What shall I change more ?
Below notification example:
Maybe you have adapt the notification variables in your notification script which is probably also explained here
I am afraid it did not help me much
Bump !
Any idea why my CheckMK server shows time -2 hours while the docker container date command shows the correct time ?
Whatever TZ value I set in my docker container enviroment I always see the same time displayed by checkmk GUI
I checked in my docker system and it is working without problem.
Inside your container edit /omd/sites/<sitename>/etc/environment
Insert there “TZ=CET” restart the core and Apache service.
First now the time shown inside CMK should be your local time and also my mail messages have the correct local time. This is exactly what @r.sander said in his post.
One other thing is that you should link this file inside the container from outside as the change will be lost at container restart.
Thank You a lot ! I does work like a charm. I hope it will also help with time in email notifications.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.