Cloned Ubuntu 20 to Ubuntu 22

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
morganmiskell
Posts: 7
Joined: Thu May 23, 2019 4:21 pm

Cloned Ubuntu 20 to Ubuntu 22

Post by morganmiskell »

I am trying to test upgrade from Ubuntu 20 to Ubuntu 22.

Old Machine was nagiosclt is PHP7.4
New Machine is nagiosclt22 is PHP8.1

When I manually run the command /usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php
I get the following response below, any ideas? Compatibility issue with PHP8?


PHP Fatal error: Uncaught mysqli_sql_exception: Incorrect string value: '\xE2\x94\x94\xE2\x94\x80...' for column 'value' at row 1 in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php:788
Stack trace:
#0 /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php(788): mysqli_query()
#1 /usr/local/nagiosxi/html/db/adodb/adodb.inc.php(1268): ADODB_mysqli->_query()
#2 /usr/local/nagiosxi/html/db/adodb/adodb.inc.php(1246): ADOConnection->_Execute()
#3 /usr/local/nagiosxi/html/includes/db.inc.php(542): ADOConnection->Execute()
#4 /usr/local/nagiosxi/html/includes/utils-systat.inc.php(69): exec_sql_query()
#5 /usr/local/nagiosxi/cron/sysstat.php(146): update_systat_value()
#6 /usr/local/nagiosxi/cron/sysstat.php(78): get_daemon_status()
#7 /usr/local/nagiosxi/cron/sysstat.php(54): process_sysstat()
#8 /usr/local/nagiosxi/cron/sysstat.php(20): do_sysstat_jobs()
#9 {main}
thrown in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php on line 788
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Cloned Ubuntu 20 to Ubuntu 22

Post by gormank »

How did you transfer the nagios data to the new host?
I guess this is nagios XI?
See the backup and restore doc for info on switching to a new OS version.
vikiedavie
Posts: 1
Joined: Tue Dec 27, 2022 6:21 am
Location: Waco
Contact:

Re: Cloned Ubuntu 20 to Ubuntu 22

Post by vikiedavie »

Sloboda Studio - web-development with care
morganmiskell
Posts: 7
Joined: Thu May 23, 2019 4:21 pm

Re: Cloned Ubuntu 20 to Ubuntu 22

Post by morganmiskell »

@gormank - Thanks, spot on.....I completely forgot that when changing the O/S you should backup/restore the database and run the repair script to update ... the combination of the two resolved all the issues and it is running as expected now.

cd /tmp/
wget https://assets.nagios.com/downloads/nag ... _repair.sh
chmod +x restore_repair.sh
./restore_repair.sh
Post Reply