Page 1 of 2
Reinstalled Nagios 5.6.14 on CentOS 7
Posted: Thu Mar 04, 2021 7:54 pm
by tmattingly
Hi!
We were able to get Nagios 5.6.14 installed on a new CentOS 7 system and restored the database without errors however on the admin panel, the monitoring engine and performance grapher have a red '!'. I verified that the current system before I took the backup to the .tar file did not have this issue. I'm not sure where to go with this as click on the gear to the right. Monitoring engine says an error occured and Performance Grapher said the command successfully completed but its still in red condition. Any ideas?
Tom
Re: Reinstalled Nagios 5.6.14 on CentOS 7
Posted: Fri Mar 05, 2021 11:49 am
by dchurch
If you PM me a system profile I can diagnose further. Get one by going to Admin (top menu) => System Profile (in the left menu), then clicking the blue button.
If you're unable to generate the the profile through the web interface, please try generating it from the command line by running these commands as root:
Code: Select all
rm -rf /usr/local/nagiosxi/var/components/profile*
/usr/local/nagiosxi/scripts/components/getprofile.sh SUPPORT
Then send me the resulting
/usr/local/nagiosxi/var/components/profile.zip file.
If the profile script fails, please include the ENTIRE output.
Note about Database Backend
ndo2db, (sometimes called the Database Backend) is no longer needed in newer (>=5.7.0) versions of Nagios XI.
ndo2db is our older technology that basically listens on a UNIX socket for database inserts, then handles the actual insertion into the database. It has limits, being that it runs into issues when it tries to insert more than the database can handle. In newer versions (
Nagios XI 5.7.0 and later), this was replaced by just writing directly to the database from the Nagios worker threads. In addition to being able to handle more database inserts, this resulted in an overall performance boost, too.
Hence, it may be better for performance reasons to use Nagios XI 5.7.x or later.
Re: Reinstalled Nagios 5.6.14 on CentOS 7
Posted: Wed Mar 17, 2021 4:01 pm
by dchurch
There are a bunch of rogue files (*~, #*#) in your /usr/local/nagios/etc directory. Best to remove them.
And the line endings in your
nagios.cfg file are DOS line endings, and it's preventing the monitoring engine from starting. Fix it with this command:
Code: Select all
sed -i.bak -e 's,\r,,g' /usr/local/nagios/etc/nagios.cfg
Re: Reinstalled Nagios 5.6.14 on CentOS 7
Posted: Wed Mar 17, 2021 4:34 pm
by tmattingly
Thank you its better!!!
I don't appear to be getting SQL (or DB) errors anymore but monitoring engine and performance grapher are still red. When I try to start either I get an error.
Tom
Re: Reinstalled Nagios 5.6.14 on CentOS 7
Posted: Thu Mar 18, 2021 12:56 pm
by dchurch
I see a database error in your logs, likely due to incompatible string escaping for insertion into your PostgreSQL database.
Fix this by setting standard_conforming_strings = of in /var/lib/pgsql/data/postgresql.conf, then restart postgres.
Re: Reinstalled Nagios 5.6.14 on CentOS 7
Posted: Thu Mar 18, 2021 2:04 pm
by tmattingly
Thank you for that last comment. Both are still red and when I go to start monitoring engine I get a an error but performance grapher does say it successfully completed but doesn't turn green.
Tom
Re: Reinstalled Nagios 5.6.14 on CentOS 7
Posted: Thu Mar 18, 2021 2:19 pm
by dchurch
Your config.inc.php is set up to store performance data spool in
/var/nagiosramdisk/spool/ (for performance reasons) but no such directory exists. Perhaps there's a missing
/etc/fstab entry that set that up.
Follow this guide to re-setup the RAM disk
Re: Reinstalled Nagios 5.6.14 on CentOS 7
Posted: Thu Mar 18, 2021 3:46 pm
by tmattingly
YES!!!! That was the ticket. Thank you!!!!!!!!
On a sidenote does the backup include custom plugins/etc?
Re: Reinstalled Nagios 5.6.14 on CentOS 7
Posted: Fri Mar 19, 2021 10:31 am
by dchurch
Yes, the backup includes the entire /usr/local/nagiosxi directory. Any plugins and components should be part of that.
Re: Reinstalled Nagios 5.6.14 on CentOS 7
Posted: Fri Mar 19, 2021 5:53 pm
by tmattingly
Thats really good news. We will work on putting it back to its original IP address and check its operation.
Thank you,
Tom