nagios Red hat linux

Nagios Notifications using SMTP server with Authentication

We needed to setup Nagios to utilize our internet service providers SMTP Email server for notification emails. The biggest problem was that the ISP’s outgoing email server requires authentication.

Nagios setup with SMTP outgoing authentications.

These are instructions and examples on how we got this setup working. I hope this helps others in the Nagios community.

This process utilizes a perl script called “sendEmail”.

1) Download from or here.
2) Extract the file and copy the sendEmail into /usr/local/bin.
3) chmod +x /usr/local/bin/sendEmail.

Now the setup and customization of Nagios.

1) Edit /usr/local/nagios/etc/resource.cfg – add (3) new entries.

2) Edit /usr/local/nagios/etc/objects/commands.cfg

Change command_line for command_name notify-host-by-email:

3) Touch file /var/log/sendEmail
4) Chown nagios:nagios /var/log/sendEmail

5) Now restart Nagios service

Go into Nagios and send an alert and check the /var/log/sendEmail log file. It should say “Email was sent successfully”.

Thats it. Your done and now using your ISP’s email server with authentication.

Sample Commands:


Sample Commands with sendmail:

Leave a Reply

Your email address will not be published. Required fields are marked *