NEMS 1.1 or 1.2.x

Instructions may be found in the Legacy Email Configuration Documentation.

NEMS 1.3+

A step-by-step guide to configuring Email Notifications on your NEMS Server.

Configure Your SMTP Settings

With NEMS System Settings Tool configuration is a breeze. Enter your email server settings into the interface and then press Save.

Using Gmail SMTP For Nagios Notification Sending

When using Gmail for SMTP, a few extra steps are required.

First, if you are a G Suite user (that is to say, you're using Gmail but have an email address on their service as opposed to an address), visit this page and configure the SMTP Relay Service like this:

Of course, if you happen to have a static public IP address on your NEMS server, go ahead and enable IP filtering for even more security.

Then, visit this page and enable “Allow users to manage their access to less secure apps”.

Now that you've done that, or if you are not a G Suite user, you'll need to enable the setting for “less secure apps” here:

2017/10/03 08:33 · Robbie Ferguson

Test Your Email Notification Settings

I've written an easy-to-use script which will load your settings from resource.cfg and send you a test email. It will also show you in the terminal the results, which may be helpful if you believe there is an error (since you'll be able to see the output of sendemail).

To run the test script: 


 where [email protected] is your actual recipient email address (must be different than the one you set in resource.cfg).

If you'd prefer JSON output, add a 1 to the command:

nems-mailtest 1

JSON output requires NEMS Linux 1.6+.

2017/10/03 08:27 · Robbie Ferguson

Setup the target email address

  1. Login to NEMS NConf and visit the Contacts section. You'll see your user there (which you setup with nems-init). Edit it and change the email address to the one you would like.
  2. Setup notifications for each service
  3. Set Enable Notifications to 1, and Notification Type to whatever you'd like.
2017/11/13 17:12 · Robbie Ferguson

NEMS Email Notification Definitions

Configuring notifications in NEMS (or Nagios for that matter) requires a knowledge of what the single-character options mean. Here is an overview:

When you see w,u,c,r,f,n these are the definitions:

  • w Notify if in warning state,
  • u Notify if in unknown state,
  • c Notify if in critical state,
  • r Notify if recovered from a previously bad state,
  • f Notify if the service is flapping (on and off and on and off)
  • n Never notify.

When you see d,u,r,f,s,n these are the definitions:

  • d Notify if host is down,
  • u Notify if host is unreachable (eg. Internet down),
  • r Notify upon recovery,
  • f Notify if the host is flapping,
  • s Notify if a scheduled service downtime begins or ends,
  • n Never notify.
2017/10/03 08:21 · Robbie Ferguson
  • config/email_notifications.txt
  • Last modified: 2019/02/04 11:35
  • (external edit)