Ad Widget

Collapse

How to check for time drift?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Crazy Marty
    Member
    • Sep 2007
    • 75

    #1

    How to check for time drift?

    I'd like to create a trigger (in Zabbix 1.6.1) that compares a "sacred machine"'s localtime to another monitored machine's localtime. If I create a trigger like:

    ({T_Linux_time:system.localtime.last(0)}-{Timehost:system.localtime.last(0)})>3600

    in template "T_Linux_time", Zabbix complains that I can't mix template hosts (I think it means templates *and* hosts).

    I just want to make sure none of the monitored machines drift too far.... I can't rely on having ntp running on them all, because they're not all physical machines (ntp does not play well on Xen or VMware virtual machines).

    Any ideas?
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    you can check localtime against zabbix server time (i think fuzzytime function).
    so if you have ntpd on zabbix server, that should work nicely.
    Zabbix 3.0 Network Monitoring book

    Comment

    • tzn
      Junior Member
      • Apr 2011
      • 19

      #3
      Originally posted by richlv
      you can check localtime against zabbix server time (i think fuzzytime function).
      so if you have ntpd on zabbix server, that should work nicely.
      Would you elaborate on that?

      Comment

      • simonseztech
        Junior Member
        • Dec 2011
        • 2

        #4
        Check if client local time is in sync with Zabbix server time

        Use of function fuzzytime():

        {MySQL_DB:system.localtime.fuzzytime(10)}=0

        The trigger will change to the problem state in case when local time on server MySQL_DB and Zabbix server differs by more than 10 seconds.

        Comment

        • tzn
          Junior Member
          • Apr 2011
          • 19

          #5
          Thanks! Ones has only to take care of time on Zabbix server

          Comment

          Working...