Ad Widget

Collapse

Not receiving email notifications, but receiving jabber ones

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fernandomm
    Junior Member
    • Dec 2009
    • 7

    #1

    Not receiving email notifications, but receiving jabber ones

    Hello,

    I have a CentOS + Cpanel server running Zabbix but i am not able to receive email notifications.

    I have set my action to send both email/jabber notifications but i am only receiving jabber ones ( which means that triggers/actions conf are ok ).

    Is there a way to debug and find why mail is not being sent?

    I have verified SMTP configuration over and over, but it seems to be ok. I also verified Exim log and no activity shows up from zabbix there.

    Thanks,

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

    #2
    attach media type config data for email. check administration -> audit -> actions for details on why email sending fails.
    obviously, verify that you can connect to and send messages from zabbix server with the config you have in media type set
    Zabbix 3.0 Network Monitoring book

    Comment

    • ericgearhart
      Senior Member
      • Jan 2009
      • 115

      #3
      I'm running into this too...

      I've verified my configs over and over, and everything looks fine. I've got
      "Media Types" configured with a working SMTP server, I can send an email fine from the command line of the server, and I have setup a user account with an email address.

      On the Zabbix dashboard an Issue is created for my test trigger event, but I never get any indication that Zabbix tried to send an email.

      I've looked in /var/log/zabbix_server.log and I've looked in Administration->Notifications, and the Action I setup to email me never seems to fire off

      I'm running Zabbix 1.8, clean install on CentOS 5.4

      Comment

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

        #4
        check action conditions. do they match the event ?
        does the user have at least read access to the host that generated the event ?

        if everything seems fine, maybe post screenshots of :

        action config;
        user medias (in user profile);
        event;
        action log for the period.
        Zabbix 3.0 Network Monitoring book

        Comment

        • ericgearhart
          Senior Member
          • Jan 2009
          • 115

          #5
          Wow I never thought of that... yes the user I created had basically no privileges... I'm new to Zabbix and I didn't even think of adding permissions to the user I created

          I changed the user to receive the email to Admin, added my email address and viola! I received an email! I even see the 'Actions' column list the action taken as being 'sent email' on the dashboard

          Thanks a lot... I think after the 1st of the year (when everyone is back and off vacation) I'll be making a pitch for Zabbix at my work

          Comment

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

            #6
            http://www.zabbix.com/documentation/...ons#operations
            Zabbix 3.0 Network Monitoring book

            Comment

            • fernandomm
              Junior Member
              • Dec 2009
              • 7

              #7
              Thanks for the replies, but as i needed this fixed asap, i used a script. In case someone is interested:

              Code:
              #!/bin/sh
              
              export zabbixemailto=$1
              export zabbixsubject=$2
              export zabbixbody=$3
              
              echo "$zabbixbody"  | mail -s "$zabbixsubject" "$zabbixemailto";
              Place it inside bin directory and add media type = script.

              Comment

              • ericgearhart
                Senior Member
                • Jan 2009
                • 115

                #8
                Ha! Nice hack!

                After I investigated my problem more, I noticed that when I changed the subject of the Action the emails started mysteriously working. Our Exchange server has been flaky though so I can't really blame Zabbix definitively at this point...

                Comment

                • anrstone
                  Member
                  • Oct 2009
                  • 61

                  #9
                  We have very similar symptoms to this but cannot get email notifications to work even after trying to chage the subject line of the action. Rather weirdly we have a DR system that is sending OK with the exact same configuration except build versions (Live system is version 1.8.2 and DR is 1.8.1 still).

                  Does anybody else have this problem and / or have fixed it

                  Thanks

                  Comment

                  • anrstone
                    Member
                    • Oct 2009
                    • 61

                    #10
                    So this seems to have fixed itslef after we deleted and re-added the same data a few times...

                    Comment

                    Working...