Ad Widget

Collapse

Please advise: time sync check

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fisher
    Junior Member
    • Oct 2008
    • 27

    #1

    Please advise: time sync check

    What would be the best way to check if my servers are runing time synced? Or check if the client machine clock is whitin a few seconds to the server?

    Thanks in advance!
  • fisher
    Junior Member
    • Oct 2008
    • 27

    #2
    To answer myself: I accidentally found the fuzzytime in the documentation and it works like a dream.

    Comment

    • macindy
      Junior Member
      • Nov 2009
      • 5

      #3
      Hi!

      Can you give me a hint what you set as key?

      Comment

      • fisher
        Junior Member
        • Oct 2008
        • 27

        #4
        {ifapp1:system.localtime.fuzzytime(5)}=0

        However it is not clear me how this time offset calculated. I reach this machine via a zabbix proxy and sometimes I receive false alarms, I believe because a delay caused by the proxy. But not sure.

        Comment

        • LenR
          Senior Member
          • Sep 2009
          • 1005

          #5
          I have a check at 10 seconds, 5 may be just too close. However, the localtime only refreshes every 30 seconds, so zabbix must sync the refresh with the trigger check.

          One question, can this be done for a windows client? I don't see a localtime item.

          Comment

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

            #6
            system.localtime should be pretty much supported on all systems. did you check that ?
            also, i'd suggest some longer period, more like 30 seconds, unless you have a really hard requirements on time sync.
            Zabbix 3.0 Network Monitoring book

            Comment

            • LenR
              Senior Member
              • Sep 2009
              • 1005

              #7
              Yea, system.localtime works, I'm not sure what I was doing wrong before.

              I only check time to 10 seconds for 2-3 time servers. It time servers should be more authoritative than the zabbix server, but this validates the zabbix server has valid time. The rest of the servers are checking for 1 or 2 minute drift.

              Comment

              • tzn
                Junior Member
                • Apr 2011
                • 19

                #8
                Anyone has a hint how to define trigger for time sync?

                Comment

                • LenR
                  Senior Member
                  • Sep 2009
                  • 1005

                  #9
                  Ensure your zabbix server (or proxy) is sync'ed via ntp and has "good time".

                  This is for any client over 60 seconds out of sync:

                  {Template_Linux:system.localtime.fuzzytime(60)}=0

                  Comment

                  Working...