Ad Widget

Collapse

Creating a recovery expression

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pmurtey
    Member
    • Mar 2020
    • 91

    #1

    Creating a recovery expression

    Hi All, If we were to trigger an alert on a particular entry in a log, how do we set up a recovery expression to execute a script to correct the problem? We understand the expression constructor for the Problem expression, but not so much for Recovery expression. TIA
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    Recovery expression is additional expression, what needs to be satisfied before whole trigger can be set to false again. SO it is not just that your problem expression turns False, after that also recovery expression must become false...
    as per docs https://www.zabbix.com/documentation...iggers/trigger
    Recovery expression Logical expression (optional) defining additional conditions that have to be met before the problem is resolved, after the original problem expression has already been evaluated as FALSE.
    Recovery expression is useful for trigger hysteresis. It is not possible to resolve a problem by recovery expression alone if the problem expression is still TRUE.
    This field is only available if 'Recovery expression' is selected for OK event generation.

    To execute a script to fix the issue you probably need to configure it to act on original problem, not on recovery...

    Or you mixed up terms and you want to configure an action to trigger a script to resolve the issue found in logfile?

    Comment

    • pmurtey
      Member
      • Mar 2020
      • 91

      #3
      Hi Cyber, If there is script to restart a service that is detected down from a log trigger on a Linux system, then where would the script be invoked from in the trigger?

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #4
        It is not a trigger. it is an action that you need, which, based on matched conditions (tags, hostnames etc), is triggered to fulfill that task. You need to build that script.

        Comment

        • pmurtey
          Member
          • Mar 2020
          • 91

          #5
          Hi Cyber, Thank you for pointing us in the right direction. We understand about the action as the correct mechanism now.

          Comment

          Working...