Ad Widget

Collapse

Timezone issues with trigger actions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • slyper
    Junior Member
    • Jun 2022
    • 12

    #1

    Timezone issues with trigger actions

    ​Hello Zabbix Forum,

    We run a Zabbix server (zabbix-server-pgsql:latest) and frontend (zabbix-web-apache-pgsql:latest) container in Amazon ECS.
    We configured some trigger actions containing a time period.
    After working hours, the monitored servers are shutdown, and we don't want to get notified for problems during night time (e.g. ICMP ping fails).
    The time period we use for this in the trigger action: 1-5,09:00-19:00​

    The problem is, we still get these ICMP ping failure notifications:
    Click image for larger version

Name:	mail_notification.png
Views:	728
Size:	25.0 KB
ID:	456419

    In the notification, you can see the local time is 19:03 (3 minutes after the server is shutdown), but Zabbix thinks it's 18:03 (hence the notification).

    Some more details:
    - the frontend container is run with the environment variable PHP_TZ = Europe/Brussels
    - the GUI default timezone setting is also Europe/Brussels
    - the local and server time widget seem to indicate the same time
    Click image for larger version

Name:	local-server-time.png
Views:	848
Size:	24.6 KB
ID:	456417
    - while on a bash terminal in the zabbix server container, UTC is shown (so same date, only different timezone)
    Click image for larger version

Name:	server-time.png
Views:	723
Size:	3.7 KB
ID:	456418

    How can I solve this issue? Do I need to use UTC times for my time period? This would mean I would need to adjust them when switching timezone (daylight saving time).

    kind regards​​
  • slyper
    Junior Member
    • Jun 2022
    • 12

    #2
    Bump
    We solved this by using UTC times in the trigger action's time period. This is not our preferred solution, as our servers change timezone 2 times a year (CET and CEST), so we'll need to update the times in Zabbix as well.
    Anyone knows a better solution?

    Comment

    • Markku
      Senior Member
      Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
      • Sep 2018
      • 1781

      #3
      Is there a reason you cannot fix the timezone in the Zabbix server container? I mean, if Zabbix is running on UTC (that doesn't use DST) and your alerting times depend on local time (that uses DST), you will have one-hour-off problems at some point.

      Markku

      Comment

      • KopyrightKid
        Junior Member
        • May 2023
        • 1

        #4
        I also have run into this at my organization - if anyone has found a fix other than using UTC in trigger conditions and just keeping an eye out for daylight savings time I'm all ears!

        Comment


        • KopyrightKid
          KopyrightKid commented
          Editing a comment
          Update: We opted to set the host machine to our local timezone
      Working...