Ad Widget

Collapse

Is there a way to "refresh" trigger ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vovan190181
    Junior Member
    • Apr 2021
    • 1

    #1

    Is there a way to "refresh" trigger ?

    I'm trying to accomplish the following notification scenario for my SSL Certification expiration warning trigger:

    I have a trigger that kicks off once the certificate validity has less than 30 days remaining.
    I need to get an alert (notification) about this trigger once in 24 hours until the SSL Certificate has been renewed.
    In the notification I want to display the number of the remaining days that the Certificate has left.

    Currently I was able to set a step the Action item to 1-0 and step period is set to 24 hours, which allows to receive the notification once in 24 hours.
    However, in current setup I'm not getting the updated number of days in the notification.
    I get the same number 29 days since the trigger kicked-off. If I manually close the trigger then the next trigger cycle will show the updated number of remaining days.

    I guess that the trigger is not being refreshed each time the number of remaining SSL Certificate validity days changes.
    I tried allowing the trigger to open multiple alerts items but I would like to avoid this configuration as it clogs the alerts screen.

    Is there a way to "refresh" the trigger after a certain amount of time without closing it and opening a new one ?
    Last edited by vovan190181; 26-04-2021, 10:42.
  • epizarro
    Junior Member
    • Sep 2020
    • 8

    #2
    zabbix is supposed to close triggers not to keep

    Comment

    • tim.mooney
      Senior Member
      • Dec 2012
      • 1427

      #3
      Zabbix allows you to use Expression macros in trigger-based notifications, including complex expression (multiple functions, etc).

      Zabbix also automatically sets macros for things like {EVENT.DATE} and {EVENT.AGE}, and it provides a macro {DATE} for the current date. See Supported macros for more information.

      Unfortunately, even though complex expression macros are supported in notifications, I don't see any way to do "date math" using any of the available functions, so there's no easy way to use the available macros to do something like:

      Code:
      {? 30 - ({EVENT.DATE} - {DATE})}
      within a notification, to have the countdown calculated automatically at the time the notification is sent based upon macros that Zabbix already provides.

      You can, however, pass values to custom commands, so you could in theory write a custom command that just functions as your notification script, and does the date math within the script.​

      Comment

      Working...