Ad Widget

Collapse

Macro for duration of problem in Recovery Message

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • doub
    Junior Member
    • Jan 2014
    • 12

    #1

    Macro for duration of problem in Recovery Message

    Hi,

    I would like to know if there is already a macro implemented for returning the age/duration of the event which caused the trigger to fire off.
    It would be useful to see the value in the Recovery Message.

    Following Macros do not work out for my purposes:
    Code:
    {EVENT.RECOVERY.TIME}
    {EVENT.AGE}
    Thanks for any suggestions.
  • Linwood
    Senior Member
    • Dec 2013
    • 398

    #2
    I was just setting up email which included something similar, can you elaborate on why {EVENT.AGE} is not appropriate?

    Comment

    • doub
      Junior Member
      • Jan 2014
      • 12

      #3
      Unfortunately it does not return the values as needed.
      Below is what I can see in my Emails.

      Problem message:

      [...]
      Event.Age: 0m
      Event.Time: 18:50:11
      Event.Recovery.Time: {EVENT.RECOVERY.TIME}
      [...]

      OK message:

      [...]
      Event.Age: 0m
      Event.Time: 08:28:11
      Event.Recovery.Time: {EVENT.RECOVERY.TIME}
      [...]

      Comment

      • Linwood
        Senior Member
        • Dec 2013
        • 398

        #4
        It's working for me (2.2.1 built from sources on ubuntu 13.10).

        Problem message:

        HOST.IP1=192.168.128.14
        EVENT.RECOVERY.TIME={EVENT.RECOVERY.TIME}

        Recovery message:

        HOST.IP1=192.168.128.14
        EVENT.RECOVERY.TIME=10:07:29

        I'm using it in a shell notification, I wouldn't think that would matter (vs an email sent directly).

        You are using a real recovery message as opposed to one coded to send manually for PROBLEM->OK or similar?

        PS. {EVENT.AGE} works for me also, e.g.

        Problem:

        Original event ID: 113289 occurred at 2014.02.07 10:03:29 age as of this message 1m

        OK:

        Original event ID: 113289 occurred at 2014.02.07 10:03:29 age as of this message 4m
        Last edited by Linwood; 07-02-2014, 17:15.

        Comment

        • doub
          Junior Member
          • Jan 2014
          • 12

          #5
          >> You are using a real recovery message as opposed to one coded to send manually for PROBLEM->OK or similar?

          I am using the predefined actions and just added the macros. Other macros work well just these ones do not.


          >> It's working for me (2.2.1 built from sources on ubuntu 13.10).

          I am using v2.0.9. May be it is not implemented yet in this version?!

          Comment

          • Linwood
            Senior Member
            • Dec 2013
            • 398

            #6
            Originally posted by doub
            >> It's working for me (2.2.1 built from sources on ubuntu 13.10).

            I am using v2.0.9. May be it is not implemented yet in this version?!
            From the manual:

            Time of the recovery event.
            Can be used in recovery messages only.
            Supported since 2.2.0.


            Comment

            • doub
              Junior Member
              • Jan 2014
              • 12

              #7
              Yes, I guessed so. I will have to upgrade then.
              I just hoped there will be a workaround for v2.0.9 with some kind of a formula.
              Still thanks.

              Comment

              Working...