Ad Widget

Collapse

Actions - Event acknowledged = "Ack"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DSon
    Member
    • Sep 2009
    • 44

    #1

    Actions - Event acknowledged = "Ack"

    Hi,

    I've had a look at the main RFC for actions (http://www.zabbix.com/forum/showthread.php?t=11433), however I'm struggling to get the action (step) condition 'Event acknowledged = "ACK"' to work.

    All I want to do is create an action that, when a trigger is acknowledged, sends an e-mail.

    I've tried embedding this step within an existing action - for example, after step 1, execute the acknowledgement step. This doesn't (and probably shouldn't work) because it's a one time thing i.e.

    Step 1-1 - send initial "problem" e-mail (if Event acknowledged = "Not Ack")
    Step 2-2 - send "acknowledged" e-mail (if Event acknowledged = "Ack")
    Step 3-3 - send a "problem reminder" e-mail (if Event acknowledged = "Not Ack")

    I did try to use "Step 2-0" (to infinity) however this doesn't work for some reason? i.e.

    Step 1-1 - send initial "problem" e-mail (if Event acknowledged = "Not Ack")
    Step 2-0 - send "acknowledged" e-mail (if Event acknowledged = "Ack")
    Step 3-0 - send a "problem reminder" e-mail (if Event acknowledged = "Not Ack")

    I need to get an acknowledgement shortly after the event was acknowledged, ideally. Period delays make this difficult when I need several steps to execute based on the step condition Event - acknowledged (if they work?).

    I then experimented with a completely seperate action - but this doesn't work (maybe because the action that sends out the initial problem e-mail is somehow taking ownership of the Event acknowledged functionality?). I just don't know whether having multiple actions for the same trigger applies to the Step conditions - I know that you can have multiple actions based on the same trigger because I've used it.

    My only thought is that perhaps instead of the Event acknowledged being a step condition, perhaps there could be a new action condition instead? That way, the action would be evaluated for all my triggers (and so I wouldn't need a step for this in each individual action (more efficient?).

    Hope someone can help,
    Danny.
  • Jesster
    Junior Member
    • Mar 2007
    • 11

    #2
    I'm also trying to do this, but have not had any success (v1.8.5)

    Comment

    • untergeek
      Senior Member
      Zabbix Certified Specialist
      • Jun 2009
      • 512

      #3
      I had to create a way around this myself. I made my own edits to acknow.php and acknow.inc.php to accommodate the lack of notification on Ack.

      I would be happy to put my changes up here, if anyone is interested.

      There are some limitations. My modifications so far only work for single event acknowledges. If you were to browse to Monitoring -> Triggers or -> Events, you would not get acknowledge emails. For that reason, I have included an acknowledge link in my Prowl notifications and Email notifications, e.g. Acknowledge: https://www.example.com/zabbix/acknow.php?eventid={EVENT.ID}

      With that in place, all one has to do is to click on the link to be taken directly to the UI where you can add text and hit "Acknowledge." When you do so, an email will be sent out to all of the members of a given group (definable in acknow.inc.php). I have also made some extra mods for our particular setup where I do some quick host group to user group mappings, e.g. acknowledges for hosts in the Network Hardware host group would also be sent to users with email addresses in the Network Hardware user group.

      This isn't ideal, but it does provide 95% of what we need it for. In addition, along with each acknowledge email goes the same transcript of who acknowledged at what time you see in the UI.

      Comment

      • Jesster
        Junior Member
        • Mar 2007
        • 11

        #4
        I got mine to somewhat work - I needed to uncheck the 'default message' on the escalation steps.. did you guys try that?

        Comment

        • untergeek
          Senior Member
          Zabbix Certified Specialist
          • Jun 2009
          • 512

          #5
          Well, yes. Please don't take offense as none is intended, but how could we send an "Acknowledge" email if it were just the default (which would be a regular error notification)?

          I have never previously been able to get this to work. Please define "somewhat work" if you would.

          For a frame of reference, I've created an entirely separate action in the past, one dedicated to sending out only Acknowledge notifications, I've tried an extra step escalation with the "Ack" checkbox set appropriately, none have sent so much as a single notice. I'd be very curious to see what you've done.

          On the other hand, now that I have mine working, I really enjoy having the acknowledge history with comments inline with the email, so I'm not sure what I would want sent with the normal action now.

          Comment

          • Jesster
            Junior Member
            • Mar 2007
            • 11

            #6
            Attached is a screen shot.

            I'm short for time right now but I wanted to quickly show you what I meant with the default message - once I unchecked that and put my message in, I received ACKs


            From one of my working ACK Actions:
            Code:
            Subject: ACK: Testfile exists: PROBLEM
            
            2011.05.23 13:46:43 "John Smith (jsmith)"
            ack!!
            Attached Files

            Comment

            • untergeek
              Senior Member
              Zabbix Certified Specialist
              • Jun 2009
              • 512

              #7
              …

              They have fixed it! This is EXACTLY what I tried before and it did not work!!!

              Let me give this another try on my side. Thanks for the extended details and screen shot!

              Comment

              • untergeek
                Senior Member
                Zabbix Certified Specialist
                • Jun 2009
                • 512

                #8
                Oh, wait. It still doesn't work. You must have a magic system or something. I copied your setup verbatim and the audit log shows it didn't even attempt to send anything. My hacked php did, though.

                Comment

                • untergeek
                  Senior Member
                  Zabbix Certified Specialist
                  • Jun 2009
                  • 512

                  #9
                  Also, the downer of this setup (other than that it does not work for me) is that it won't send updated emails out if someone updates or posts a new comment through the Ack system. The action sends only once. On the plus side, however, is if this works for you, you also get Acks when you do a bulk acknowledge.

                  Comment

                  • Jesster
                    Junior Member
                    • Mar 2007
                    • 11

                    #10
                    Sorry that didn't work - here's a a working copy that I use:
                    Attached Files

                    Comment

                    • untergeek
                      Senior Member
                      Zabbix Certified Specialist
                      • Jun 2009
                      • 512

                      #11
                      Again, I think your system may have some magic in it. I know that for myself and several others, we've tried exactly what you have there, with very little variation. It's never worked. I do not know how you have been so fortunate that this works, but it doesn't for me (and neither did it for others).

                      I'm glad it works for you, though!

                      Comment

                      • Mojah
                        Member
                        • Apr 2010
                        • 60

                        #12
                        Originally posted by untergeek
                        Again, I think your system may have some magic in it. I know that for myself and several others, we've tried exactly what you have there, with very little variation. It's never worked. I do not know how you have been so fortunate that this works, but it doesn't for me (and neither did it for others).

                        I'm glad it works for you, though!
                        I'd like to bring this up again, as we're struggling with the same problem. With the most simple configuration below, it does not work to send an e-mail upon acknowledging an event.

                        I've even changed it to make it a recurring event, just in case the action is looping in escalations to match the condition of "Event acknowledged = "Ack"" just to exclude that as a possible reason.

                        Did anyone else get this to work properly, without modifying the acknow.php code to send ack's (since it would fail for ack's being done by the API on mobile devices)?
                        Attached Files

                        Comment

                        • Mojah
                          Member
                          • Apr 2010
                          • 60

                          #13
                          With a bit of further testing, I can confirm this only works if an infinite escalation loop is being made. But that of course means you'll receive an action every time the "period" timer is reached.

                          Period: 1-0 (infinite)
                          Escalation history:
                          Problem started: 2011.08.08 08:32:00 Age: 5m
                          2. 2011.08.08 08:33:14 sent Email [email protected] "mattias (Mattias)"
                          3. 2011.08.08 08:34:17 sent Email [email protected] "mattias (Mattias)"
                          4. 2011.08.08 08:35:18 sent Email [email protected] "mattias (Mattias)"
                          5. 2011.08.08 08:36:20 sent Email [email protected] "mattias (Mattias)"
                          Did anyone find a workaround for this, or are there Zabbix Crew that do things differently?

                          Comment

                          • eskytthe
                            Senior Member
                            Zabbix Certified Specialist
                            • May 2011
                            • 363

                            #14
                            Originally posted by untergeek
                            I had to create a way around this myself. I made my own edits to acknow.php and acknow.inc.php to accommodate the lack of notification on Ack.

                            I would be happy to put my changes up here, if anyone is interested.
                            Hi untergeek
                            I am looking for something like this to add in acknow.php. Please share it
                            Thanks!
                            Erik

                            Comment

                            • untergeek
                              Senior Member
                              Zabbix Certified Specialist
                              • Jun 2009
                              • 512

                              #15
                              Huh. I had posted it to my forum blog, but now I see that the blog is no longer there (spam problems?).

                              Give me a bit and I'll see if I can post it again, or if there's a way to get to my old blog post, I'll see if I can put that out there. If I don't, private message me in a few days and remind me.

                              Comment

                              Working...