Ad Widget

Collapse

PATCH: Add fuzzytime trigger function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • James Wells
    Senior Member
    • Jun 2005
    • 664

    #1

    PATCH: Add fuzzytime trigger function

    Greetings,

    When dealing with VMWare guests, it is often imposible to keep systems truly in sync. One time test could show the VMWare guest as much as 45 seconds off from the VMWare server time. This function perform a fuzzy check against a returned unix time. The function accepts a parameter which indicates the variation allowed between the returned unix time and the server's current time.

    Example: {host:custom[time].fuzzytime(30)} will return 1 if the value of custom[time] is greater than current time minus 30 seconds and less than current time plus 30 seconds, 0 otherwise.

    NOTE: I haven't had time for anything but the most rudimentary tests. YMMV.

    EDIT: Forgot to mention, this is meant to be used with the new vfs.file.[cm]time and system.localtime items.

    EDIT: Corrected example to show the correct fuzzytime usage.

    EDIT: 09 Sep 05 -- Corrected a minor bug and updated to works agains the current CVS
    Attached Files
    Last edited by James Wells; 09-09-2005, 20:11.
    Unofficial Zabbix Developer
  • James Wells
    Senior Member
    • Jun 2005
    • 664

    #2
    Awesome. Thank you for implementing this Alexei.

    EDIT: Okay, I'm a dork... I forgot to clear my development version of Zabbix, re-applied the patch and got the various 'This patch already applied' messages. Well, Alexei, thank you, if you do implement it.
    Last edited by James Wells; 12-09-2005, 21:02.
    Unofficial Zabbix Developer

    Comment

    • Alexei
      Founder, CEO
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Sep 2004
      • 5654

      #3
      Done! The patch is applied.
      Alexei Vladishev
      Creator of Zabbix, Product manager
      New York | Tokyo | Riga
      My Twitter

      Comment

      Working...