Ad Widget

Collapse

How to create trigger for fuzzytime(X)=0 for Y minutes and then firing the trigger?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • numemiie
    Junior Member
    • Mar 2021
    • 1

    #1

    How to create trigger for fuzzytime(X)=0 for Y minutes and then firing the trigger?

    Hello,

    I have Linux clients running the ntpd service to synchronize time with NTP server.
    Currently, I'm able to monitoring and made trigger fired when the time on my Linux client is different with time on the Zabbix server for 5 seconds with this expression
    {Linux by Zabbix agent:system.localtime.fuzzytime(5)}=0

    My goal is, let's say I'm OK to let the Linux client has system.localtime 5 seconds different with time on the Zabbix server for a period of time (for example, 10 minutes) to waiting for ntpd service to synchronize the time back.
    If my Linux client is able to synchronize the time within 10 minutes, then this trigger not have to fire.
    But if the client can't synchronize the time within 10 minutes, then this trigger should be firing.

    How can I achieve this?
    Was check at https://www.zabbix.com/documentation...gers/functions and https://www.zabbix.com/documentation...ers/expression
    But can't find a way to mixing 2 functions in one expression, or using an operator between two or more expressions to achieve this one.
  • mwildam
    Member
    • Feb 2021
    • 72

    #2
    You could try to create an action that matches your trigger name and instead of reporting, run a remote command. That command being a zabbix_sender call to a separate trapper item reporting the result of your fuzzytime. For that item you could create a trigger using the prev(600)=1 function 600 seconds = 10 minutes). - So basically you use your fuzzytime trigger to create another item on which you create the second trigger watching the fuzzytime check result. - OK, I know that is not a simple approach...

    Comment

    • eithor
      Member
      • May 2020
      • 50

      #3
      Did you look at the "count" trigger function? You could count the number of times (values) that fuzzytime triggers.

      Comment

      Working...