Ad Widget

Collapse

No notifications are being sent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dmorin
    Junior Member
    • Oct 2008
    • 8

    #1

    No notifications are being sent

    I upgraded to 1.6.4 just over a month ago and afterward, notifications worked for a few days, and then quit. I finally started looking into it today and can't figure out what's going on. In the web interface, on the dashboard next to the issue, under actions, it lists the notifications as being sent, but I never receive them. I have a normal email, a script that sends email, and a jabber notification all setup and I receive none of them. The only thing I can find in the log that appears every time a notification should be sent is the following:

    export: 5: 2: bad variable name
    export: 5: 2: bad variable name
    export: 5: zabbix_agent(d): bad variable name
    export: 5: zabbix_agent(d): bad variable name

    The notification script also writes a line to a log file each time it is run and I don't see any entries for when notifications should be sent, so it's not even running the script.

    I searched google and couldn't find anything related to the above lines and zabbix so I'm hoping someone here is smarter than I am. I've also upgraded from 1.6.4 to 1.6.5 today hoping that would fix the issue but it hasn't. And I'm sure the correct version is started because I can see it in the logs on startup.

    Any ideas?
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    1. check that users have at least read-only access to the hosts that generate the events;
    2. check administration -> audit -> audit actions
    Zabbix 3.0 Network Monitoring book

    Comment

    • dmorin
      Junior Member
      • Oct 2008
      • 8

      #3
      Thanks for the response!

      Yes, all accounts that should be getting notifications have read and write access. Under Audit > Audit Actions, it shows all of the notifications that I'm expecting with a green Sent status.

      Upon further investigation, the normal email notifications are showing up in my email server logs. I'm sure I'm just not seeing those because most email providers filter out emails from my ip range (consumer cable isp).

      So I guess what I really need help troubleshooting is why zabbix isn't running the script (my other set of notifications). The script I have setup (which worked in 1.4) uses sendEmail to login to my gmail account and send it (so it gets delivered). The script works fine when called directly from the command line and logs the call, so for some reason the script isn't being run by zabbix. Is there a way to see what zabbix is calling so I can determine if there are any obvious errors?

      From my server config file:
      # Location for custom alert scripts
      AlertScriptsPath=/home/zabbix/bin
      # Location of external scripts
      ExternalScripts=/etc/zabbix/externalscripts

      The script is at /home/zabbix/bin/send_email.sh. I also have a dumplicate in /etc/zabbix/externalscripts since it used that one in 1.4. Both are owned by the zabbix user and group and has execute permissions. In the zabbix interface, it's configured as: "send_email.sh".

      Any ideas?

      Comment

      • richlv
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Oct 2005
        • 3112

        #4
        if you don't see those in action log, then zabbix most likely isn't calling the script.
        you could still test that - replace send_email.sh with something like :
        echo "$@" >> /tmp/somefile
        and trigger the action a couple of times.

        some other things to check - are user media severities and time when media is active correctly set/enabled ?
        Zabbix 3.0 Network Monitoring book

        Comment

        • dmorin
          Junior Member
          • Oct 2008
          • 8

          #5
          Sorry if my previous post wasn't clear. I DO see the script notifications in the action log, but I do not see any log entries in the log that the script itself generates. So zabbix thinks its calling the script successfully, but the script isn't actually getting called.

          I'll try some other scripts and the line you mentioned and see if that gives me any more clues. Thanks again for your help.

          Comment

          • dmorin
            Junior Member
            • Oct 2008
            • 8

            #6
            Alright, I got it figured out. The problem was the script. It was pulling in the args using:

            export toaddress=$1

            and changing it to

            export toaddress="$1"

            with quotes made it work. I think it was failing because the subject and body had spaces in them. It's so weird that it used to work fine and then just stopped. I'm guessing when I did some ubuntu updates, it broke something. Anyway, thanks for your help!

            Comment

            Working...