Page 1 of 1

I do not receive alerts by nagios

Posted: Thu Jul 04, 2013 10:58 am
by zurrachillo
Hello I created a new server with nagios 3.4.4 and now it does not work sending alerts is a CentOS 6.3, formerly contacts.cfg configure mail alerts sent me but now it does not work. I tried to use, nor send email I get alerts.
anyone can help me

This is an example post that sent me to yahoo
[email protected] <[email protected]>;
Nagios ***** *****

Notification Type: PROBLEM

Service: C: \ Drive Space
Host: Application Server
Address: 192.20.40.145
State: WARNING

Date / Time: Thu February 14 2013 3:27:54 CET

Additional Info:

c: \ - total: 11.99 Gb - used: 10.25 Gb (86%) - free 1.74 Gb (14%)

thank you very much
a greeting.

Re: I do not receive alerts by nagios

Posted: Mon Jul 08, 2013 11:47 am
by sreinhardt
Have you verified that you are not on a blacklist or that your emails are not being sent to spam. Yahoo and hotmail, are pretty notorious for just blindly rejecting mail if the domain is not valid or if the IP is on a blacklist. You might also verify that your provider has not disabled you from sending out on port 25.

Re: I do not receive alerts by nagios

Posted: Tue Jul 16, 2013 6:17 am
by zurrachillo
sreinhardt wrote:Have you verified that you are not on a blacklist or that your emails are not being sent to spam. Yahoo and hotmail, are pretty notorious for just blindly rejecting mail if the domain is not valid or if the IP is on a blacklist. You might also verify that your provider has not disabled you from sending out on port 25.
Hello
Before leaving I receive yahoo emails from nagios and now I get nothing, I tested with a mail server that I have in the company and it does not matter.
a greeting.

Re: I do not receive alerts by nagios

Posted: Tue Jul 16, 2013 10:47 am
by MLaing
Check the /etc/mail.rc file. What server are you using to send email with? --- Can you send email from the CentOS system? You might try running the line below and see if you get the email.

Code: Select all

 /usr/bin/printf "%b" "*****Nagios Test*****\n\nThis is a test" | /bin/mail -s "****Nagios Test****" [email protected]
If you don't get an email when you run the command manually, the problem is because your CentOS system isn't properly configured to send email or someone else along the line is blocking the email (Maybe for an invalid from domain?).

Re: I do not receive alerts by nagios

Posted: Tue Jul 16, 2013 1:00 pm
by abrist
MLaing wrote:If you don't get an email when you run the command manually, the problem is because your CentOS system isn't properly configured to send email or someone else along the line is blocking the email (Maybe for an invalid from domain?).
Spot on. Thanks for the input.

@OP: What were the results of MLaing's suggestion?
It may also be prudent to check your mail logs:

Code: Select all

tail /var/log/maillog 

Re: I do not receive alerts by nagios

Posted: Thu Jul 18, 2013 3:44 am
by zurrachillo
MLaing wrote:Check the /etc/mail.rc file. What server are you using to send email with? --- Can you send email from the CentOS system? You might try running the line below and see if you get the email.

Code: Select all

 /usr/bin/printf "%b" "*****Nagios Test*****\n\nThis is a test" | /bin/mail -s "****Nagios Test****" [email protected]
If you don't get an email when you run the command manually, the problem is because your CentOS system isn't properly configured to send email or someone else along the line is blocking the email (Maybe for an invalid from domain?).
Hi, I have received the test correctly to my company server but not yahoo, what is that alarm importate get to my corporate mail.
after checking the emails I receive have to look because the nagios lleguan.
What is the next step?
hit the mail received.

de: root <[email protected]>
responder a: [email protected]
para: [email protected]
fecha: 18 de julio de 2013 09:27
asunto: ****Nagios Test****

*****Nagios Test*****

This is a test

Re: I do not receive alerts by nagios

Posted: Thu Jul 18, 2013 3:50 am
by zurrachillo
abrist wrote:
MLaing wrote:If you don't get an email when you run the command manually, the problem is because your CentOS system isn't properly configured to send email or someone else along the line is blocking the email (Maybe for an invalid from domain?).
Spot on. Thanks for the input.

@OP: What were the results of MLaing's suggestion?
It may also be prudent to check your mail logs:

Code: Select all

tail /var/log/maillog 
Hi after several tests I have reviewed the log and this is what I get in the last post.
I get e-if test effort nagios but not automatically.
a greeting.

Jul 18 09:29:38 nagios6 postfix/pickup[31713]: E75661217EE: uid=0 from=<root>
Jul 18 09:29:38 nagios6 postfix/cleanup[2453]: E75661217EE: message-id=<[email protected]>
Jul 18 09:29:38 nagios6 postfix/qmgr[2423]: E75661217EE: from=<[email protected]>, size=519, nrcpt=1 (queue active)
Jul 18 09:29:39 nagios6 postfix/smtp[2456]: E75661217EE: to=<[email protected]>, relay=xxx.xxx.xxx.xxx[xxx.xxx.xxx.xxx]:25, delay=0.54, delays=0.08/0/0.01/0.45, dsn=2.0.0, status=sent (250 Ok, message saved <Message-ID: [email protected]>)
Jul 18 09:29:39 nagios6 postfix/qmgr[2423]: E75661217EE: removed

Re: I do not receive alerts by nagios

Posted: Thu Jul 18, 2013 11:32 am
by abrist
That tail of the maillog just shows the [email protected] address, not the yahoo one. Could you post a bigger tail of the maillog (in code wraps)?

Code: Select all

tail -50 /var/log/maillog