2072 / 108316610
Nagios 4 : Notification Setting2020/01/15
This is the Email Notification Settings section.
It is enabled on some items by default but if you change it, configure like follows.
|||Set notification recipients. And aldo Nagios sends notifications with [mail] command, so install it.|
dnf -y install mailx
# line 32: set recipient email address
systemctl restart nagios
|||It's possible to change notification setting on Nagios admin site.
Login to it and click [Services] link, 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.
|||Click [Enable notifications for this service].|
|||Click [Commit] button.|
|||That's OK all.|
|||If notification is enabled and a service has some troubles, the notification like follows are sent to the recipients you set.|
From firstname.lastname@example.org Mon Jan 13 23:01:12 2020 Return-Path: <email@example.com> X-Original-To: root@localhost Delivered-To: root@localhost Date: Mon, 13 Jan 2020 23:01:12 -0600 To: root@localhost Subject: ** PROBLEM Service Alert: localhost/SSH is CRITICAL ** User-Agent: Heirloom mailx 12.5 7/5/10 Content-Type: text/plain; charset=us-ascii From: firstname.lastname@example.org Status: R ***** Nagios ***** Notification Type: PROBLEM Service: SSH Host: localhost Address: 127.0.0.1 State: CRITICAL Date/Time: Mon Jan 13 23:01:12 CST 2020 Additional Info: connect to address 127.0.0.1 and port 22: Connection refused