Ad Widget

Collapse

Sending Trapper Messages in Alerts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cstackpole
    Senior Member
    Zabbix Certified Specialist
    • Oct 2006
    • 225

    #1

    Sending Trapper Messages in Alerts

    Hello,
    I have a program that was created in house that needs to have its status events monitored. So I set things up so that it calls zabbix_sender with the right parameters and I set up a trapper on the server.

    This works well.

    We just adapted it to send out messages when the program requires special attention. So I set up a trigger on the key words and had it send out emails and thought I was done but I am not getting what I had hoped for. I can get the status (ON|OFF) or the key or the id but I can not seem to get the actual message that was posted in the history view of the TRAPPER.

    Any ideas?

    Thanks guys.
  • sbadger
    Member
    • Dec 2005
    • 81

    #2
    Have you tried the macro:
    {TRIGGER.COMMENT}

    in your actions?

    Comment

    • cstackpole
      Senior Member
      Zabbix Certified Specialist
      • Oct 2006
      • 225

      #3
      Hello,
      Thanks for the suggestion but that does not work. I think it is because the Zabbix server is still 1.1.1 (1.1.4 is setup on our test systems but we have not migrated the main server over yet). The reason why I think that, is because no matter how hard I look, I dont see that function in the manuals I have so I am guessing it is a new feature (though I could be completly wrong). Nevertheless, {TRIGGER.COMMENT} shows up in the email but I do not get the actual message.

      Is there any other way to do this? Or should I just wait till the upgrade?

      Thanks for the response.

      Comment

      • Alexei
        Founder, CEO
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Sep 2004
        • 5654

        #4
        Upgrade to 1.1.7. The macro was not supported in early 1.1.x.
        Alexei Vladishev
        Creator of Zabbix, Product manager
        New York | Tokyo | Riga
        My Twitter

        Comment

        • cstackpole
          Senior Member
          Zabbix Certified Specialist
          • Oct 2006
          • 225

          #5
          OK, thats what I thought I might have to do.
          Thanks for your help!

          Comment

          • cstackpole
            Senior Member
            Zabbix Certified Specialist
            • Oct 2006
            • 225

            #6
            I finally had a chance to do an upgrade to 1.4 and test out the TRIGGER.COMMENT but so far I am not having any luck. Maybe someone can help me figure out why?

            I created a host with no profile called trappertest. I created an item called trapped with a key of trapped of the type Zabbix Trapper with Text being the information. I set up a trigger "trappertest:trapped.nodata(30)#1" and configured it to send me an email with the body:
            {HOSTNAME}: {TRIGGER.NAME}: {STATUS}
            {TRIGGER.COMMENT}

            Back on the command line I run: zabbix_sender MyIP 10051 trappertest trapped "Hello"

            Zabbix traps the message, triggers, and the email is sent but I only get "trappertest: trapperMessage: ON" in the email. I don't get the message "Hello".

            I believe I have everything set up right, but I still am unable to get the message sent by a trap in the email. Can anyone suggest something I might be doing wrong?

            BTW, Props to the Zabbix team. I am really liking all of the changes and updates for 1.4 so far.

            Thanks!

            Comment

            • cstackpole
              Senior Member
              Zabbix Certified Specialist
              • Oct 2006
              • 225

              #7
              Horray! I got TRIGGER.COMMENT working. Sadly, I made several changes at once in the settings and I am not certain what I did to fix it

              On top of all that, I figured out the solution to the original problem of capturing the data from a log/trapper and sending it along to the email. {your_host.your_trigger.last(0)}
              seems to work well though if anyone else has a better solution please post back.

              Thanks Guys! Great work on Zabbix!

              Comment

              Working...