Ubuntu 26.04

Nagios : Notification Setting2026/06/10

 

This is the notification email setting.
If the necessary applications, such as an SMTP server, are already installed, the notification email setting will be enabled by default. If you want to change it, follow the steps below.

[1]

For Email notification, it needs SMTP Server.
On this example, it based on the environment that SMTP Server is running on localhost.

[2] Set notification recipients. And aldo Nagios sends notifications with mail command, so install it.
root@dlp:~#
vi /etc/nagios4/objects/contacts.cfg
    # line 32 : change recipient email address
    email                   root@localhost ;

root@dlp:~#
systemctl restart nagios4

[3] It's possible to change notification setting on Nagios admin site.
Login to it and click [Services], then services list is displayed.
The icons which are displayed near a service name are just the one which notification is disabled. (HTTP and SSH corresponds to the example below)
To enable notification on a service, click service name first.
[4] Click [Enable notifications for this service].
[5] Click the [Commit] button.
[6] That's OK to set the notification.
[7] If notification is enabled and a service has some troubles, the notification like follows are sent to the recipients you set.
Return-Path: <nagios@dlp.srv.world>
X-Original-To: root@localhost
Delivered-To: root@localhost
Received: by dlp.srv.world (Postfix, from userid 108)
        id 5BE45607F4; Wed, 10 Jun 2026 01:09:48 +0000 (UTC)
Subject: ** PROBLEM Service Alert: localhost/SSH is CRITICAL **
To: <root@localhost>
User-Agent: mail (GNU Mailutils 3.20)
Date: Wed, 10 Jun 2026 01:09:48 +0000
Message-Id: <20260610010948.5BE45607F4@dlp.srv.world>
From: nagios@dlp.srv.world

***** Nagios *****

Notification Type: PROBLEM

Service: SSH
Host: localhost
Address: 127.0.0.1
State: CRITICAL

Date/Time: Wed Jun 10 01:09:48 UTC 2026

Additional Info:

connect to address 127.0.0.1 and port 22: Connection refused
Matched Content