Author Topic: How to do timedrift detection on agents  (Read 2299 times)

Anders

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
How to do timedrift detection on agents
« on: December 14, 2012, 10:01:06 am »
Hi,

I have been trying to setup a time-drift template, that monitors my agents local system time and compares it to the time of the monitoring server, basically I'd like to find servers that drifts in time despite of a NTP daemon (all servers are in the same time zone).

But I can't seem to get it to work as I only seem to be able to get the agents local time.

Any suggestions on how this could be solved?

Thanks

Anders

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 7137
    • View Profile
Re: How to do timedrift detection on agents
« Reply #1 on: December 14, 2012, 10:10:07 am »
Hi!

You can use transformation script to calculate time difference with NetXMS server. Add parameter System.CurrentTime, and use the following transformation script:

Code: [Select]
return time() - $1;

You'll got difference in seconds between NetXMS server's local time and remote system time.

Best regards,
Victor

Anders

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Re: How to do timedrift detection on agents
« Reply #2 on: December 14, 2012, 10:22:05 am »
Aha! Thanks Victor, this should have been obvious, but for some reason I got the impression that time() returned the agents local time and not the netxms servers local time.