Ad Widget

Collapse

Create a trigger that fires when on the Nth occurrence with X minutes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sebke
    Junior Member
    • Jul 2018
    • 2

    #1

    Create a trigger that fires when on the Nth occurrence with X minutes

    Hi,
    I need to create an ICMP Ping trigger that will fire only when the ping fails 3 times with 3 minutes between each check, so the host would have to be down 9 minutes (or 3 consecutive times during all the 3 minute checks)
    This is the expression I've tried but it does not work:
    {Template ICMP Ping:icmpping.max(3m)}=3
    Any ideas?
  • kernbug
    Senior Member
    • Feb 2013
    • 330

    #2
    Hi,

    To correctly configure the trigger for your task, you need to decide how to monitor with a simple check, see what options are available under the documentation:
    Host accessibility by ICMP ping. 0 - ICMP ping fails

    1 - ICMP ping successful
    target - host IP or DNS name
    packets - number of packets
    interval - time between successive packets in milliseconds
    size - packet size in bytes
    timeout - timeout in milliseconds
    Example:
    ⇒ icmpping[,4] → if at least one packet of the four is returned, the item will return 1.

    See also: table of default values.
    Thus, the trigger expression can be with either 0 or 1. Suppose we set up the data item as follows icmpping[,1] and data collection frequency 180s, example trigger expression will be: icmpping.max(#3)}=0, in other words - check every 180 seconds (3 minutes) with only one icmp packet send, if max of last #3 values = 0 rise up trigger.

    The frequency of data collection is determined in the data item:
    settings: https://www.zabbix.com/documentation...fig/items/item

    Trigger settings are determined by expressions and functions: https://www.zabbix.com/documentation...ers/expression and https://www.zabbix.com/documentation...gers/functions

    Comment

    • sebke
      Junior Member
      • Jul 2018
      • 2

      #3
      Thanks @kernbug I've tested this out but it looks like it still triggers under 9 minutes (got an alert at the 7 minute mark) my guess is that the max(#3) interval is not 180s. So every 180 seconds it checks 3 times in a short time and reports back.
      I've managed to make it work by editing the item ping update interval to 180sec then using the exact configuration you suggested on the trigger expression. Thanks! @kernbug
      Last edited by sebke; 03-07-2018, 15:59.

      Comment

      Working...