PDA

View Full Version : Not receiving email notifications, but receiving jabber ones


fernandomm
22-12-2009, 19:37
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
27-12-2009, 00:15
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 :)

ericgearhart
27-12-2009, 06:18
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

richlv
27-12-2009, 14:08
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.

ericgearhart
27-12-2009, 19:18
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

richlv
28-12-2009, 08:09
http://www.zabbix.com/documentation/1.8/manual/config/actions#operations :)

fernandomm
28-12-2009, 11:18
Thanks for the replies, but as i needed this fixed asap, i used a script. In case someone is interested:

#!/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.

ericgearhart
28-12-2009, 19:45
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...

anrstone
30-04-2010, 16:37
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

anrstone
04-05-2010, 13:57
So this seems to have fixed itslef after we deleted and re-added the same data a few times...