ICTNUT Posted August 20, 2008 Posted August 20, 2008 Hi All, I have done a clean vanilla LAMP install (Ubuntu 7.10 Server) and then install Nagios 3.03 with the plugins. Now all is working fine aprt from emails are not getting sent. This is what I have done; Change the email address in contacts.cfg to mine install mailx as per nagios instructions changed email config in commands.cfg to show /usr/bin/mail and not /bin/mail Now when I bring a host down I get no email, I have always used nagios without email notification, more of a visual thing but Iwould like to get this sorted now. Any ideas of what I need to look for??
kmount Posted August 20, 2008 Posted August 20, 2008 Forgetting nagios for a second, can you send mail from the terminal using the mail command?
ICTNUT Posted August 20, 2008 Author Posted August 20, 2008 hmm good point have not tried that, don't have remote server access to this server so i'lltryit in the morning.... To be continued
ICTNUT Posted August 21, 2008 Author Posted August 21, 2008 Ok from the command line i did the following: mail -s "this is a test" [email protected] then it just sits there doing nothing until I escape out, so it would look like email is not setup correctly on the box. Any ideas anyone??
kmount Posted August 21, 2008 Posted August 21, 2008 It will sit there as that's expected behaviour for the command you entered. If you put a single period . and press enter and enter again it should exit cleanly.
ICTNUT Posted August 21, 2008 Author Posted August 21, 2008 OK did it agin and got: . Cc: Null message body; hope that's ok this then returned me back to the command prompt and as yet no email
kmount Posted August 21, 2008 Posted August 21, 2008 Unsure about ubuntu but look in /var/log/mail.log for your email to see what it says. Aug 21 10:28:49 core postfix/smtp[12009]: 6588B4A403C: to=, relay=ns1.bob.com[82.3.45.5]:25, delay=33, delays=0.01/0.03/30/3.2, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as BDD559BC07B)
ICTNUT Posted August 21, 2008 Author Posted August 21, 2008 checked it and it's empty, nothing, nada, zilch..........
Geoff Posted August 21, 2008 Posted August 21, 2008 Install the 'ssmtp' package and configure /etc/ssmtp/ssmtp.conf to suit your network enviroment. 1
kmount Posted August 21, 2008 Posted August 21, 2008 It suggests you don't have an MTA. Do the nagios instructions tell you to use apt-get/aptitude or install from a deb? 1
ICTNUT Posted August 21, 2008 Author Posted August 21, 2008 Install the 'ssmtp' package and configure /etc/ssmtp/ssmtp.conf to suit your network enviroment. Spot on Geoff: We now have mail from the command line Will now go and trip up nagios to see if mail comes from there also, I may return......
ICTNUT Posted August 21, 2008 Author Posted August 21, 2008 We have email from nagios YEY! Many thanks guys.
kmount Posted August 21, 2008 Posted August 21, 2008 Now all we need is for Nagios to make coffee and cookies.
HMCTech Posted April 27, 2009 Posted April 27, 2009 Are email notifications enabled by default? Is there any configuration you have to do? I have followed the instructions in this thread and I am able to send emails using the command line but Nagios is not sending any emails when services go critical.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now