Jump to content

Recommended Posts

Posted

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;

 

  1. Change the email address in contacts.cfg to mine
  2. install mailx as per nagios instructions
  3. 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??

Posted

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 :p

Posted

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??

Posted

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.

Posted

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 :(

Posted

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)

Posted

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......

  • 8 months later...
Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...