nagios trigger an alert after installation

If it's just to test your alerts/escalations change the Critical threshold on (one of) your check(s) to something that will trigger a CRITICAL check result.

Alternatively use the check_dummy plugin (from the Nagios Plugins pack) and set it up to return a CRITICAL status, for example:

check_dummy!2

Other status codes you can return are:

0 - OK
1 - Warning
2 - Critical
3 - Unknown

Nagios (as shipped with the EPEL repository) comes with a sample configuration which monitors localhost out of the box, as soon as you service nagios start. If you've installed Nagios from EPEL on a RHEL (or clone) box, then it should already be giving you host and service status reports for localhost.


You can send a test notification/alert from the web UI, but that really only tests that the notification command is able to send email.

  1. By default Nagios uses the mail command. Open a console and check if mail is installed. On some minimal Linux installs you will need to install it.
  2. Check if your mail server is correctly configured. You might have to configure Postfix or SendMail, and send a test email from the command line first.
  3. In Nagios 4 web UI, click on a host, open the detail panel and select the "Send custom host notification" from the "Host Commands" menu on the right. This should open a form where you can fill out the fields, select "Forced" and press "Commit" to force a notification.