Page 4 of 4

Re: After upgrade from 5.3.4 to 5.4.0, Database Backend erro

Posted: Thu Jan 05, 2017 12:11 pm
by jwelch
r# ll /usr/lib/systemd
total 4
drwxr-xr-x 2 root root 4096 Nov 7 13:59 system


Meanwhile, I tried the 'restart' action in XI System Component Status (which failed),
but left some info in /usr/local/nagiosxi/var/sysstat.log:

CMDLINE=/etc/init.d/nagios status
nagios (pid 805) is running...
OUTPUT=nagios (pid 805) is running...
RETURNCODE=0
CMDLINE=/etc/init.d/npcd status
NPCD running (pid 7762).
OUTPUT=NPCD running (pid 7762).
RETURNCODE=0
CMDLINE=systemctl status ndo2db
sh: systemctl: command not found
OUTPUT=
RETURNCODE=127

Per Google, systemctl is included in RHEL 7. I don't see it on my RHEL 6 servers.

Re: After upgrade from 5.3.4 to 5.4.0, Database Backend erro

Posted: Thu Jan 05, 2017 12:30 pm
by jwelch
looks like the problem may be with /usr/local/nagiosxi/cron/sysstat.php

# Check if we are on a systemctl or not and if we are checking ndo2db
if (file_exists('/usr/lib/systemd')) {
if ($darr["daemon"] == 'ndo2db') {
$cmdline = sprintf("systemctl status %s", $darr["daemon"]);
}
}


/usr/lib/systemd exists, but there are no files in it.

# find /usr/lib/systemd
/usr/lib/systemd
/usr/lib/systemd/system
#

Note: This is RHEL 6.8....I hear that systemctl may be in 6.9 but that it's still in beta.

Re: After upgrade from 5.3.4 to 5.4.0, Database Backend erro

Posted: Thu Jan 05, 2017 12:40 pm
by jwelch
I commented out that portion of sysstat.php, restarted nagios, tried the start action again, and checked sysstat.log:

CMDLINE=/etc/init.d/nagios status
nagios (pid 39945) is running...
OUTPUT=nagios (pid 39945) is running...
RETURNCODE=0
CMDLINE=/etc/init.d/npcd status
NPCD running (pid 7762).
OUTPUT=NPCD running (pid 7762).
RETURNCODE=0
CMDLINE=/etc/init.d/ndo2db status <---this looks better ;)
ndo2db (pid 8400) is running...
OUTPUT=ndo2db (pid 8400) is running...
RETURNCODE=0


The Database Backend icon is now green.

Re: After upgrade from 5.3.4 to 5.4.0, Database Backend erro

Posted: Thu Jan 05, 2017 3:54 pm
by jomann
You are correct - it's being fixed for 5.4.1. Essentially it's checking for systemd services existing but it seems like it needed to be a more direct check since people somehow have that directory on systems that do not actually have systemd on them. Again, it's superficial and won't affect the actual backend but you can remove that section from the sysstat.php on EL5/6 systems and it will be green again if your ndo2db is running.

Re: After upgrade from 5.3.4 to 5.4.0, Database Backend erro

Posted: Sun Mar 05, 2017 8:52 am
by bosecorp
there was a bug that was discovered. Trevor was telling me the other day. has than been fixed in the latest release

Re: After upgrade from 5.3.4 to 5.4.0, Database Backend erro

Posted: Mon Mar 06, 2017 10:32 am
by dwhitfield
The segfault bug is different than the GUI icon showing the incorrect status.

That said, both of those bugs have been fixed in 5.4.2. There are, however, bugs slated to be fixed in 5.4.3.

Re: After upgrade from 5.3.4 to 5.4.0, Database Backend erro

Posted: Tue Apr 04, 2017 11:02 am
by bosecorp
Ok, you can close this ticket now.

We will upgrade our Dev Enviroment first