Emailing nagios alerts

Hello
I’m new to the nagios realm, I’ve managed to install nagios on my firewall/gateway server (centos5) but i would like to be able to receive email alerts when there are problems…

How/where (steps please) do I configure nagios to send emails and can the emails be sent from a different server(i have 1 VM running as my smtp server)

Eventually i want to monitor the VM server too but for now I just want to get emails about alerts.

This is what i’m asking for:
nagios-server —> smtp-server ----> my crackberry device

Thanks in advance!!!

Hi,
You just follow the quick installation guide and give your email address to which you are willing to receive the mail alerts to in your contacts.cfg file

You should also give your mail address in nagios.cfg at the admins mail address.

Regards,
512

wouldn’t that send the message to the user@localhost???

My nagios server IS NOT my smtp server.

I need to have nagios send the alerts to another server (the SMTP server) so that server can e-mail me.

The default install email notifications use /bin/mail on the local machine, so if you configure sendmail correctly with your smtp server address etc it will forward the mail onto you SMTP relay server.

HTH

/S

The easiest way I found was to download and configure Sendmail to relay to your SMTP server. Under Cent 5

yum install sendmail sendmail-cf

Edit /etc/mail/sendmail.mc where you find
define (SMART_HOST',smtp-relay-info-here’)dnl

Configure sendmail
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

Restart the service
service sendmail restart

Check your mail log to see if and where it is sending it.
/var/log/maillog