Page 1 of 1

Nagios Core 4.4.5 in CentOS8 - Unable to monitor existing

Posted: Thu Dec 17, 2020 12:39 pm
by arun1727
Hi Team,

We have upgraded to Nagios Core 4.4.5.
But unable to monitor the old environment Nagioscore 3.2
Please assist me

what is the error in below output
nagios.service - Nagios Core 4.4.5
Loaded: loaded (/usr/lib/systemd/system/nagios.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2020-12-17 18:11:50 CET; 17min ago
Docs: https://www.nagios.org/documentation
Process: 36396 ExecStopPost=/bin/rm -f /usr/local/nagios/var/rw/nagios.cmd (code=exited, status=0/SUCCESS)
Process: 36394 ExecStop=/bin/kill -s TERM ${MAINPID} (code=exited, status=0/SUCCESS)
Process: 36416 ExecStart=/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg (code=exited, status=0/SUCCESS)
Process: 36414 ExecStartPre=/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg (code=exited, status=0/SUCCESS)
Main PID: 36417 (nagios)
Tasks: 6 (limit: 23559)
Memory: 3.3M
CGroup: /system.slice/nagios.service
├─36417 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
├─36420 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
├─36421 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
├─36422 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
├─36423 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
└─36424 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg

Dec 17 18:11:50 nagiostest nagios[36417]: wproc: Registry request: name=Core Worker 36420;pid=36420
Dec 17 18:11:50 nagiostest nagios[36417]: wproc: Registry request: name=Core Worker 36421;pid=36421
Dec 17 18:11:50 nagiostest nagios[36417]: wproc: Registry request: name=Core Worker 36423;pid=36423
Dec 17 18:11:50 nagiostest nagios[36417]: Successfully launched command file worker with pid 36424
Dec 17 18:21:20 nagiostest nagios[36417]: SERVICE NOTIFICATION: nagiosadmin;localhost;Swap Usage;CRITICAL;notify-service-by-email;SWAP CRITICAL - 0% free (0>
Dec 17 18:21:20 nagiostest nagios[36417]: wproc: NOTIFY job 4 from worker Core Worker 36421 is a non-check helper but exited with return code 127
Dec 17 18:21:20 nagiostest nagios[36417]: wproc: host=localhost; service=Swap Usage; contact=nagiosadmin
Dec 17 18:21:20 nagiostest nagios[36417]: wproc: early_timeout=0; exited_ok=1; wait_status=32512; error_code=0;
Dec 17 18:21:20 nagiostest nagios[36417]: wproc: stderr line 01: /bin/sh: /bin/mail: No such file or directory
Dec 17 18:21:20 nagiostest nagios[36417]: wproc: stderr line 02: /usr/bin/printf: write error: Broken pipe

Re: Nagios Core 4.4.5 in CentOS8 - Unable to monitor existin

Posted: Fri Dec 18, 2020 1:20 pm
by gormank
I think we need some info on which system nagiostest is, it's configuration and and what you see in Nagios.
I'd probably start with the swap alert and see why it's out of swap space.

Dec 17 18:21:20 nagiostest nagios[36417]: SERVICE NOTIFICATION: nagiosadmin;localhost;Swap Usage;CRITICAL;notify-service-by-email;SWAP CRITICAL - 0% free (0>

Re: Nagios Core 4.4.5 in CentOS8 - Unable to monitor existin

Posted: Fri Dec 18, 2020 4:06 pm
by scottwilkerson
Also, it looks like the notification command that the nagiosadmin user is using is piping to /bin/mail which doesn't exist on this system...
arun1727 wrote:

Code: Select all

Dec 17 18:21:20 nagiostest nagios[36417]: wproc: stderr line 01: /bin/sh: /bin/mail: No such file or directory
Dec 17 18:21:20 nagiostest nagios[36417]: wproc: stderr line 02: /usr/bin/printf: write error: Broken pipe