Hi Team,
Can Any one help me out to know how to send the mails using notifications when the service status changes to critical or warning or unknown.
We configured the SES and postfix too. And we are using Nagios Core 4.1.0rc1. Please send me if anyone having the clear documentation.
Mails are not sending
-
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Mails are not sending
Hi dsvprasad,
No need to shout
So typically the default notification command just does something to the effect of this:
echo "some stuff" | /bin/mail -s "Nagios says things are broken" youremail@example.com
Obviously it's more complex of a command than that, and the path to mail might be different, however you get the picture. The first place I'd start debugging is to send yourself a test E-mail using similar constructs to verify that your ISP isn't blocking your mailer on port 25. This is quite likely the problem. If it works, we'll just need to debug what's going wrong with the notify command. If it doesn't we will have to get you setup to mail using smtp or setup your postfix to relay.
Let us know. Also it might be useful to know what flavor of *NIX you installed on.
No need to shout
So typically the default notification command just does something to the effect of this:
echo "some stuff" | /bin/mail -s "Nagios says things are broken" youremail@example.com
Obviously it's more complex of a command than that, and the path to mail might be different, however you get the picture. The first place I'd start debugging is to send yourself a test E-mail using similar constructs to verify that your ISP isn't blocking your mailer on port 25. This is quite likely the problem. If it works, we'll just need to debug what's going wrong with the notify command. If it doesn't we will have to get you setup to mail using smtp or setup your postfix to relay.
Let us know. Also it might be useful to know what flavor of *NIX you installed on.
Re: Mails are not sending
Hi jdalrymple,
Thanks for the information. I am using ubuntu 12.04,the command is which you sent is working fine and I am able to get the mails internally.This is happened when I installed postfix on my machine. But we need to get the mails automatically when the service changes to critical or warning.
Thanks for the information. I am using ubuntu 12.04,the command is which you sent is working fine and I am able to get the mails internally.This is happened when I installed postfix on my machine. But we need to get the mails automatically when the service changes to critical or warning.
Re: Mails are not sending
Hello,dsvprasad wrote:Hi jdalrymple,
Thanks for the information. I am using ubuntu 12.04,the command is which you sent is working fine and I am able to get the mails internally.This is happened when I installed postfix on my machine. But we need to get the mails automatically when the service changes to critical or warning.
I suggest you read this thread. Let us know what else we can do for you!
Former Nagios Employee.
me.
me.