Page 1 of 1

Notifications not going out

Posted: Fri Jun 07, 2019 12:49 pm
by gregwhite
We have configured our backup server to send out notifications like our production server. The event log shows that it sent the notification but we are not receiving it. Also, what we are seeing in the event log is the following. You will see there are three people listed in these wproc errors. At the end of this file you will see where the event log shows it sent out the notification to these 3.

Type Date / Time Information
Runtime Error 2019-06-07 13:12:24 wproc: stderr line 02: using dumb terminal settings.
Runtime Error 2019-06-07 13:12:24 wproc: stderr line 01: No entry for terminal type "unknown";
Runtime Error 2019-06-07 13:12:24 wproc: early_timeout=0; exited_ok=1; wait_status=65280; error_code=0;
Runtime Error 2019-06-07 13:12:24 wproc: host=LKENNAGIOST01.Healthone.org; service=(none); contact=pkarr
Runtime Error 2019-06-07 13:12:24 wproc: NOTIFY job 4479 from worker Core Worker 16699 is a non-check helper but exited with return code 255
Runtime Error 2019-06-07 13:12:24 wproc: stderr line 02: using dumb terminal settings.
Runtime Error 2019-06-07 13:12:24 wproc: stderr line 01: No entry for terminal type "unknown";
Runtime Error 2019-06-07 13:12:24 wproc: early_timeout=0; exited_ok=1; wait_status=65280; error_code=0;
Runtime Error 2019-06-07 13:12:24 wproc: host=LKENNAGIOST01.Healthone.org; service=(none); contact=bhankers
Runtime Error 2019-06-07 13:12:24 wproc: NOTIFY job 4479 from worker Core Worker 16697 is a non-check helper but exited with return code 255
Runtime Error 2019-06-07 13:12:24 wproc: stderr line 02: using dumb terminal settings.
Runtime Error 2019-06-07 13:12:24 wproc: stderr line 01: No entry for terminal type "unknown";
Runtime Error 2019-06-07 13:12:24 wproc: early_timeout=0; exited_ok=1; wait_status=65280; error_code=0;
Runtime Error 2019-06-07 13:12:24 wproc: host=LKENNAGIOST01.Healthone.org; service=(none); contact=gwhite
Runtime Error 2019-06-07 13:12:24 wproc: NOTIFY job 4479 from worker Core Worker 16698 is a non-check helper but exited with return code 255
Host Notification 2019-06-07 13:12:24 HOST NOTIFICATION: pkarr;LKENNAGIOST01.Healthone.org;DOWN;xi_host_notification_handler;CRITICAL - 172.22.3.17: Host unreachable @ 172.22.3.124. rta nan, lost 100%
Host Notification 2019-06-07 13:12:24 HOST NOTIFICATION: gwhite;LKENNAGIOST01.Healthone.org;DOWN;xi_host_notification_handler;CRITICAL - 172.22.3.17: Host unreachable @ 172.22.3.124. rta nan, lost 100%
Host Notification 2019-06-07 13:12:24 HOST NOTIFICATION: bhankers;LKENNAGIOST01.Healthone.org;DOWN;xi_host_notification_handler;CRITICAL - 172.22.3.17: Host unreachable @ 172.22.3.124. rta nan, lost 100%

Re: Notifications not going out

Posted: Fri Jun 07, 2019 12:58 pm
by benhank
The good news is that we are able to send reports through email as reflected in the usr/local/nagiosxi/tmp/phpmailer.log file:

Code: Select all

[06-07-2019 12:59:45] Message sent! (method=sendmail), Referer: account/testnotification.php > PHPmailer Test
[06-07-2019 13:35:34] Message sent! (method=sendmail), Referer: includes/components/scheduledreporting > Scheduled Report
[06-07-2019 13:35:44] Message sent! (method=sendmail), Referer: includes/components/scheduledreporting > Scheduled Report
[06-07-2019 13:36:06] Message sent! (method=sendmail), Referer: includes/components/scheduledreporting > Scheduled Report
[06-07-2019 13:38:06] Message sent! (method=sendmail), Referer: includes/components/scheduledreporting > Scheduled Report
[06-07-2019 13:42:45] Message sent! (method=sendmail), Referer: account/testnotification.php > PHPmailer Test
nagios just isn't sending notifications on events

Re: Notifications not going out

Posted: Fri Jun 07, 2019 1:33 pm
by tgriep
This sounds like it could be an error in one of the PHP files on the server.

Edit this file on the server

Code: Select all

/usr/local/nagiosxi/html/config.inc.php
and change this section on the bottom from

Code: Select all

// include generic db defs
require_once(dirname(__FILE__) . '/includes/db.inc.php');

// include generic  definitions
require_once(dirname(__FILE__) . '/db/common.inc.php');
// include db-specific definitions
//require_once(dirname(__FILE__).'/db/'.$cfg['dbtype'].'.inc.php');
to

Code: Select all

// include generic db defs
if (!defined('CFG_ONLY')) { if (!defined('CFG_ONLY')) { if (!defined('CFG_ONLY')) { if (!defined('CFG_ONLY')) { if (!defined('CFG_ONLY')) { require_once(dirname(__FILE__) . '/includes/db.inc.php'); } } } } }

// include generic  definitions
if (!defined('CFG_ONLY')) { if (!defined('CFG_ONLY')) { if (!defined('CFG_ONLY')) { if (!defined('CFG_ONLY')) { if (!defined('CFG_ONLY')) { require_once(dirname(__FILE__) . '/db/common.inc.php'); } } } } }
Save the file and restart the following

Code: Select all

service nagios restart
service httpd restart
Then test a notification to see if it gets sent.

Re: Notifications not going out

Posted: Fri Jun 07, 2019 2:41 pm
by gregwhite
That was it!!! Problem resolved.
Thank you for you quick response.

Greg

Re: Notifications not going out

Posted: Fri Jun 07, 2019 3:10 pm
by tgriep
Your welcome.
I'll close and lock the post for you but feel free to open a new one in the future for any new questions.