Ad Widget

Collapse

Notification Actions, allways "In Progress"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tomtabbix
    Junior Member
    • Jan 2011
    • 7

    #1

    Notification Actions, allways "In Progress"

    I'll start by saying I have searched these forums and beyond to find a solution to this and found lots of useful hints but no magic bullet yet.

    I've been trying to set up email notifications using script media type for the purpose of using a gmail account.

    Script taken from here: http://dev.aperto.fr/projects/zabbix..._notifications

    I have the script here: /etc/zabbix/alert.d/zext_msmtp.sh - with 755 permissions

    The script works as expected if I run it from the command line as any user

    Code:
    $ ./zext_msmtp.sh <recipient> <subject> <message>

    The file /etc/zabbix/zabbix_server.conf has the line

    Code:
    AlertScriptsPath=/etc/zabbix/alert.d/

    I have created a media type
    Description: zext_msmtp
    Type: script
    Script name: zext_msmtp.sh

    I have added the media to my user




    I have created an Action for Triggers with Trigger value = "PROBLEM"




    And I have specified some triggers that will always trip true:

    e.g. Server is Up {<myservername>:agent.ping.last(0)}=1


    I can see that zabbix is registering the triggers and trying to process the action but it only gets as far as saying "In Progress"




    I have also set up a jabber account to test if that works (thinking it is a more straight forward process) but that also only says "In Progress"


    Is there something wrong with my zabbix? note: Zabbix server is running value No (this has always been the case )

    I am running version 1.8.1 , will an upgrade help here ? has anything like this been experienced before?

    Much thanks in advance for any responses.
  • JBo
    Senior Member
    • Jan 2011
    • 310

    #2
    Hi,

    In zext_msmtp.sh, you can set
    Code:
    DEBUG=1
    at line 51.

    It will send standard error to /tmp/zext_msmtp.log and add shell trace (set -x).
    It may help you find if this script reports any error.

    Regards,
    JBo

    Comment

    • tomtabbix
      Junior Member
      • Jan 2011
      • 7

      #3
      Hi JBo,

      Thanks for your reply. I should have added in my original post that I have tried your suggestion above and had no luck. the file /tmp/zext_msmtp.log never shows any evidence of zabbix touching the script, only when I run the script on the command line do I get any Debug info. It's as if Zabbix can not find the script.

      Is there any chance my zabbix_server.conf file is not located in /etc/zabbix/ ?

      Comment

      • JBo
        Senior Member
        • Jan 2011
        • 310

        #4
        Hi,

        Have checked zabbix-server.log ?

        You can also try to raise DebugLevel in /etc/zabbix/zabbix_server.conf.

        At least, you'll know if /etc/zabbix/zabbix_server.conf is really used

        Regards,
        JBo

        Comment

        • tomtabbix
          Junior Member
          • Jan 2011
          • 7

          #5
          Good call , I did look a zabbix-server.log but found it very daunting and couldn't see any reference to my script.

          If the zabbix_server.conf is the correct one I'll put up a zabbis-server.log example in case some one can spot something. I'll post back in a mo.

          Comment

          • tomtabbix
            Junior Member
            • Jan 2011
            • 7

            #6
            My server has two copies of the file zabbix_server.conf

            one here: /etc/zabbix/

            and one here: /usr/share/doc/zabbix-server-mysql/

            Zabbix seems to not pay attention to either conf file as, in both I changed the name of the log file and still the log file is zabbix_server.log

            Do I need to restart Zabbix to activate changes in the conf file? If so how might I do that?

            Comment

            • JBo
              Senior Member
              • Jan 2011
              • 310

              #7
              Originally posted by tomtabbix
              My server has two copies of the file zabbix_server.conf

              one here: /etc/zabbix/

              and one here: /usr/share/doc/zabbix-server-mysql/

              Zabbix seems to not pay attention to either conf file as, in both I changed the name of the log file and still the log file is zabbix_server.log

              Do I need to restart Zabbix to activate changes in the conf file? If so how might I do that?
              Yes, you need to restart zabbix server.
              You can restart it with
              Code:
              /etc/init.d/zabbix-server restart
              Regards,
              JBo

              Comment

              • tomtabbix
                Junior Member
                • Jan 2011
                • 7

                #8
                I have got to the bottom of my problem, and as usual the issue was as simple as "to / or not to /"

                In my zabbix_server.conf I had:

                AlertScriptsPath=/etc/zabbix/alert.d/

                on removing the last backslash, heypresto I get emails galore.

                I don't recall ever changing this from the default installation but it must have been me somewhere along the line. (micro embarrassment )

                JBo, thanks for your help.

                Comment

                Working...