URL: /nagiosxi/admin/?xiwindow=sysstat.php
Database Backend: Is Not Running
Code: Select all
# php /usr/local/nagiosxi/cron/sysstat.php
DB BACKEND:
Array
(
[last_checkin] => 2017-01-16 15:36:23
[bytes_processed] => 21154022
[entries_processed] => 38572
[connect_time] => 2017-01-16 14:56:44
[disconnect_time] => 0000-00-00 00:00:00
)
CMDLINE=/etc/init.d/nagios status
nagios (pid 1619) is running...
OUTPUT=nagios (pid 1619) is running...
RETURNCODE=0
CMDLINE=/etc/init.d/npcd status
NPCD running (pid 1508).
OUTPUT=NPCD running (pid 1508).
RETURNCODE=0
CMDLINE=systemctl status ndo2db
sh: systemctl: command not found
OUTPUT=
RETURNCODE=127
DAEMONS:
Array
(
[nagioscore] => Array
(
[daemon] => nagios
[output] => nagios (pid 1619) is running...
[return_code] => 0
[status] => 0
)
[pnp] => Array
(
[daemon] => npcd
[output] => NPCD running (pid 1508).
[return_code] => 0
[status] => 0
)
[ndoutils] => Array
(
[daemon] => ndo2db
[output] =>
[return_code] => 127
[status] => 1
)
)
Code: Select all
if (file_exists('/usr/lib/systemd')) {The problem is the Nagios appliance does not have the command systemctl, so the check will fail. I don' t understand why the other daemon checks are okay, but anyway the systemd detection is not perfect this way. This check should be better, but not perfect.
Code: Select all
if (file_exists('/bin/systemctl')) {