Ad Widget

Collapse

Help with trigger expression

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • csmall
    Member
    • Jun 2020
    • 70

    #1

    Help with trigger expression

    I have the following trigger expression defined to monitor Microsoft SQL via ODBC on Zabbix 5.4.2

    Code:
    last(/servername.domain.com/net.tcp.service[tcp,{HOST.CONN},{$MSSQL.PORT}])=0
    How can I adjust this trigger to wait 30 seconds before firing?

    Would this work?

    Code:
    last(/servername.domain.com/net.tcp.service[tcp,{HOST.CONN},{$MSSQL.PORT}],30s)=0
  • splitek
    Senior Member
    • Dec 2018
    • 101

    #2
    By definition triggers are fired when new data come. We can't stop data processing for a while and continue after some time.
    You can make delayed actions (notifications) but trigger is generated at once.

    There are also some functions that make trigger to be recalculated in 30 seconds periods:
    Time-based functions are nodata(), date(), dayofmonth(), dayofweek(), time(), now()); they are recalculated every 30 seconds by the Zabbix history syncer process.
    In expression above you are using functiction "time shift": https://www.zabbix.com/documentation...ion#time_shift
    I think it is not what you want - this function will not wait 30 seconds it only get data from: "now - 30 seconds".

    Comment

    Working...