After upgrade from 5.3.4 to 5.4.0, Database Backend error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jwelch
Posts: 225
Joined: Wed Sep 05, 2012 12:49 pm

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

Post 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.
jwelch
Posts: 225
Joined: Wed Sep 05, 2012 12:49 pm

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

Post 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.
jwelch
Posts: 225
Joined: Wed Sep 05, 2012 12:49 pm

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

Post 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.
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

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

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

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

Post by bosecorp »

there was a bug that was discovered. Trevor was telling me the other day. has than been fixed in the latest release
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

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

Post 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.
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

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

Post by bosecorp »

Ok, you can close this ticket now.

We will upgrade our Dev Enviroment first
Locked