I've been tasked with getting our NagiosXI setup running on RHEL8 and I'm having all sorts of problems.
I started with a fresh RHEL8 install and Installed NagiosXI as you would on a new server. After the installation was completed, I copied over the most recent backup from the RHEL7 machine and used the restore_xi script as detailed here: https://support.nagios.com/kb/article/m ... r-892.html
After migrating our data to the rhel8 server, I've noticed a lot of problems: I can't force immediate checks on services anymore, they give me the timeout warning, "Your request was not processed in a timely manner. It may still execute, as the server may be temporarily busy."
I also can't Apply Changes in the core config manager, it says "SQL Error [nagiosxi] : Incorrect datetime value: '0000-00-00 00:00:00' for column 'processing_time' at row 1"
When I make changes in the CCM, I click apply, but the changes aren't applied. Instead, I try manually applying the changes from Config File Management and when I try to Verify Files, it complains that there are no hosts attached to the service that I changed (so the new hosts I added don't get applied). "Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/LDAPS.cfg', starting on line 16)"
My database administration skills could definitely use improvement, but before I was forced to disable mysql binlogs we were getting about 13GB of error log files per day filling up 100% of the available space in /var
I've tried running the "/usr/local/nagiosxi/scripts/repair_databases.sh" script, but that doesn't seem to fix any of these errors. At this point I've run out of straws to grasp at and I'm facing having to wipe the server and start over; losing us about a week of work and landing us way behind schedule. If there is any other way to address these issues, I'd like to give it a try before I wipe the thing. I'm fairly certain that issues with the database are causing 95% or more of the problems I'm having.
Any help would be much appreciated!
Migrating Nagios 5.8.5 to RHEL8
Migrating Nagios 5.8.5 to RHEL8
Last edited by TreviPay on Tue Aug 10, 2021 1:12 pm, edited 1 time in total.
Re: Migrating Nagios 8.5.8 to RHEL8
Hello @TreviPay
Thanks for reaching out on your migration from RHEL7 to RHEL8 issues. You stated that it is possibly database issues and want to go ahead address other issues first and then circle back to the database issues.
First, want to find out if you have any security applications enabled, like Selinux, etc.
Let's take a look at the date/time, and timezone to make sure that everything is aligned.
Please private message the System Profile via the following command:
And the Audit log as well:
This is definitely a good start and will take a look when we receive the logs and system profile. And verify that the date/time (timezone) are correct in the php and system.
Thanks,
Perry
Thanks for reaching out on your migration from RHEL7 to RHEL8 issues. You stated that it is possibly database issues and want to go ahead address other issues first and then circle back to the database issues.
First, want to find out if you have any security applications enabled, like Selinux, etc.
Code: Select all
sestatusCode: Select all
timezone check:
php -r 'echo date("D M j G:i:s T Y")."\n";'
mysql ....SELECT
@@GLOBAL.time_zone,
@@SESSION.time_zone;'
date
ls -l /etc/localtime
php -r 'echo date("D M j G:i:s T Y")."\n";'
grep "date.timezone =" /etc/php.ini
grep date.timezone /etc/php.ini
Code: Select all
/usr/local/nagiosxi/html/includes/components/profile/getprofile.shCode: Select all
tar -cvf /tmp/audit.txt /var/log/audit/audit.log /var/log/mysql/mysqld.log
Thanks,
Perry
Re: Migrating Nagios 8.5.8 to RHEL8
# sestatus
SELinux status: disabled
mysql> select
-> @@GLOBAL.time_zone,
-> @@SESSION.time_zone;
+--------------------+---------------------+
| @@GLOBAL.time_zone | @@SESSION.time_zone |
+--------------------+---------------------+
| SYSTEM | SYSTEM |
+--------------------+---------------------+
1 row in set (0.00 sec)
# date
Fri Aug 6 07:44:32 CDT 2021
# ls -l /etc/localtime
lrwxrwxrwx. 1 root root 37 Jun 24 14:39 /etc/localtime -> ../usr/share/zoneinfo/America/Chicago
# php -r 'echo date("D M j G:i:s T Y")."\n";'
Fri Aug 6 7:45:36 CDT 2021
# grep "date.timezone =" /etc/php.ini
date.timezone = America/Chicago
# grep date.timezone /etc/php.ini
; http://php.net/date.timezone
date.timezone = America/Chicago
I will try to PM the final 2 requests...
SELinux status: disabled
mysql> select
-> @@GLOBAL.time_zone,
-> @@SESSION.time_zone;
+--------------------+---------------------+
| @@GLOBAL.time_zone | @@SESSION.time_zone |
+--------------------+---------------------+
| SYSTEM | SYSTEM |
+--------------------+---------------------+
1 row in set (0.00 sec)
# date
Fri Aug 6 07:44:32 CDT 2021
# ls -l /etc/localtime
lrwxrwxrwx. 1 root root 37 Jun 24 14:39 /etc/localtime -> ../usr/share/zoneinfo/America/Chicago
# php -r 'echo date("D M j G:i:s T Y")."\n";'
Fri Aug 6 7:45:36 CDT 2021
# grep "date.timezone =" /etc/php.ini
date.timezone = America/Chicago
# grep date.timezone /etc/php.ini
; http://php.net/date.timezone
date.timezone = America/Chicago
I will try to PM the final 2 requests...
Re: Migrating Nagios 8.5.8 to RHEL8
Hello @TreviPay
Thanks for following up and sending over the System Profile and the audit log. Question; did you bring over the hostname/IP address we see a lot of "out of bounds" and "certificate does NOT include an ID which matches the server name". It is advised to use the same hostname/IP address so things align.
Also checking to make sure that both servers are/were running the same version of XI in order to do the migration. After completing the migration you can upgrade your new machine to the latest XI version.
I understand that you have already run the database repair several times without any change in behavior.
Next, I want to have you run through the database MySQL health check by doing the following:
Once you have completed that, I would like to get a copy of the database if your company policy is okay with that:
Perry
Thanks for following up and sending over the System Profile and the audit log. Question; did you bring over the hostname/IP address we see a lot of "out of bounds" and "certificate does NOT include an ID which matches the server name". It is advised to use the same hostname/IP address so things align.
Also checking to make sure that both servers are/were running the same version of XI in order to do the migration. After completing the migration you can upgrade your new machine to the latest XI version.
I understand that you have already run the database repair several times without any change in behavior.
Next, I want to have you run through the database MySQL health check by doing the following:
Code: Select all
mysqlcheck -u root -p nagios
mysqlcheck -u root -p nagiosql
mysqlcheck -u root -p nagiosxi
mysqlcheck -u root -p --all-databasesCode: Select all
mysqldump -uroot -pnagiosxi nagiosxi > nagiosxi.sql- Then tar to compress:
Code: Select all
tar -cvzf /tmp/database.tar.gz nagiosxi.sql- Send via PM
Perry
Re: Migrating Nagios 5.8.5 to RHEL8
I did discover that I had used a version 5.8.3 backup for the restore to a 5.8.5 fresh install. Due to time constraints I had to go ahead and wipe the server, but this time around I used a version 5.8.5 backup for the restore and I'm not having any of the problems I was previously experiencing.
You can mark this issue as closed. Thanks for your time.
You can mark this issue as closed. Thanks for your time.