Kaseya Community

Alert if system's clock is off

  • Would it be possible to create a report or alerts which would show us if any of the assets’ system clocks are off? For example, we had a server today where the clock was 10 minutes slow, but we didn’t know until someone logged on and noticed.

    Legacy Forum Name: Alert if system's clock is off,
    Legacy Posted By Username: mikhail.kogan
  • I'm not sure what the variable names are but...

    On the Machine Info screen, there's "KServer Time (local)" and "Agent Time (Local)". A quick comparison of these and a report to flag them if they're different. If all of your agents are in the same time zone, you can just straight up compare the time. I advise against only comparing the minutes, as this will miss an incorrectly set time zone, or a machine that cannot synchronize because the date is out to lunch.

    You could just schedule a basic script to compare & e-mail.

    I'll dig around, time permitting, and see if I can slap something together for this, unless someone else beats me to it.

    Legacy Forum Name: How-To,
    Legacy Posted By Username: dwujcik
  • I am more curious about WHY was it 10 minutes off? If it is a domain member workstation/server, it should be getting valid time from the PDC emulator. If it is getting time from a manually configured location, is UDP123 traffic not allowed to this endpoint? Is the remote time source not accurate?

    Legacy Forum Name: How-To,
    Legacy Posted By Username: jwhitford
  • We are also looking for a solution here. In some cases we have machines that do not use a local DC for time in our Datacenter. The machines SYNC to Vmware using tools.

    How can I compare the time on 2 servers or compare a local time to the KServer itself?

    Legacy Forum Name: How-To,
    Legacy Posted By Username: corpitsol
  • Aaannnndddd.... We just had a new client report the same problem. It happens on a computer sometimes, and a reboot fixes it (which would trigger a sync with the DC when the computer resets).

    I would expect the cause is either drift from a bad RTC, or it's synchronizing to another source.

    Now I can work on the report, since the client already rebooted the machine and we can't see which machine it was.

    Legacy Forum Name: How-To,
    Legacy Posted By Username: dwujcik
  • found

    vAgentLabel.timezoneOffset

    And that's it. Looks like the time fields are dynamically generated. I've looked through all the views and much of the actual raw tables.

    Anyone know off-hand if there's a variable somewhere in the K database (tables are OK, easy enough to expose a new view) that holds the current time?

    Or, is there a script variable that can be used in a script that contains the KServer time?

    I suppose the last trick to try, would be to make a script that runs on the local machine, reads the time, and passes that to a script that gets run on the DC that compares and sends.

    For this user, because the machines and servers are both set to hit Windows Time every hour, I'm going to just monitor the W32Time service and reset it as needed, since this would compensate for a bad RTC.

    Legacy Forum Name: How-To,
    Legacy Posted By Username: dwujcik
  • found

    vAgentLabel.timezoneOffset

    And that's it. Looks like the time fields are dynamically generated. I've looked through all the views and much of the actual raw tables.

    Anyone know off-hand if there's a variable somewhere in the K database (tables are OK, easy enough to expose a new view) that holds the current time?

    Or, is there a script variable that can be used in a script that contains the KServer time?

    I suppose the last trick to try, would be to make a script that runs on the local machine, reads the time, and passes that to a script that gets run on the DC that compares and sends.

    For this user, because the machines and servers are both set to hit Windows Time every hour, I'm going to just monitor the W32Time service and reset it as needed, since this would compensate for a bad RTC or a freezing Time service.

    Legacy Forum Name: How-To,
    Legacy Posted By Username: dwujcik
  • I've found that having an event log group created for some of the Windows Time events (36, 47, etc), and then applying that event log group to all machines on the system log, and having each machine run a script to restart the Windows Time service when these events are recorded, to be quite effective at resolving time sync issues FYI.

    Legacy Forum Name: How-To,
    Legacy Posted By Username: jwhitford