Page 2 of 3

Re: Upgrade is Failing

Posted: Thu Aug 08, 2019 10:54 am
by nelsonw
Hi Scott,

I have checked this config file and noticed the following settings

cat /usr/local/nagios/etc/ndo2db.cfg
.......
.......

#####################################################################
# NDO2DB DAEMON CONFIG FILE
#####################################################################


lock_file=/usr/local/nagios/var/ndo2db.lock

ndo2db_user=nagios
ndo2db_group=nagios

socket_type=unix

socket_name=/usr/local/nagios/var/ndo.sock

tcp_port=5668


db_servertype=mysql
db_host=localhost
db_port=3306

db_name=nagios
db_prefix=nagios_

db_user=ndoutils
db_pass=<PWD>


Should db_host be updated to the hostname of my off-loaded database?

Should I then check permissions of ndoutils@<offloaded db_host> in my database?


Regards,
Nelson

Re: Upgrade is Failing

Posted: Thu Aug 08, 2019 11:13 am
by scottwilkerson
nelsonw wrote:Should db_host be updated to the hostname of my off-loaded database?
Yes, as well as the username and password

See the offloading documents here
https://assets.nagios.com/downloads/nag ... Server.pdf

Re: Upgrade is Failing

Posted: Fri Aug 09, 2019 5:52 am
by nelsonw
Hi Scott,

I got the upgrade to work, thanks :-).

The issue I now face is many of my Service checks are failing, for example those that connect to my application database using /usr/local/nagios/libexec/check_mssql. The error I receive is

UNKNOWN: PDO MSSQL/DBLIB support is not installed on this server. Try adding packages php-pdo and php-mssql on rpm systems or php-sybase on deb systems

Note:
- I recently moved from CentOS to Ubuntu O/S. The upgrade I performed was against the Ubuntu instance
- I followed the steps in https://assets.nagios.com/downloads/nag ... ios-XI.pdf, as part of the migration. Would the tar backup file I took on CentOS contain all the packages I need?
- Should I do a Full Install on the Ubuntu server to get all the packages I need (following steps in https://assets.nagios.com/downloads/nag ... -Linux.pdf)
- Will all my Services and Hosts definition files from the initial migration to Ubuntu be saved if I do a full install


Regards,
Nelson

Re: Upgrade is Failing

Posted: Fri Aug 09, 2019 6:53 am
by scottwilkerson
Generally what is recommended is doing a fullinstall on the new system and then restoring the backup.

Re: Upgrade is Failing

Posted: Fri Aug 09, 2019 7:23 am
by nelsonw
Hi Scott,

I got the following,

/tmp/nagiosxi# ./fullinstall
Error: It looks like Nagios XI is already installed in /usr/local/nagiosxi. If you know what
you're doing you can run the installer with -f or --force to run the install.

Is it okay I just run with -f option?


Regards,
Nelson

Re: Upgrade is Failing

Posted: Fri Aug 09, 2019 7:49 am
by scottwilkerson
I think you can fix your current issue by running

Code: Select all

apt-get php-sybase

Re: Upgrade is Failing

Posted: Fri Aug 09, 2019 7:58 am
by nelsonw
Hi Scott,

I already ran

sudo apt-get install php7.2-sybase (as php was pointing to php7.2)

The error message I now get is

Could not connect to dblib:host=<DB Host>:<PORT>;dbname=<DB NAME> as <DB USER> (Exception: SQLSTATE[HY000] Unable to connect: Adaptive Server is unavailable or does not exist

This has become a very critical issue for us now. Since completing the upgrade on the Ubuntu server this morning, my original Nagios XI install on CentOS has stopped working. So now we have no working Nagios XI instance and cannot effectively monitor our systems.

Any help you can provide in resolving this issue as quickly as possible would be appreciated


Regards,
Nelson

Re: Upgrade is Failing

Posted: Fri Aug 09, 2019 8:04 am
by nelsonw
FYI - I ran

apt-get install php-sybase

I still got the same new error,
Could not connect to dblib:host=<DB Host>:<PORT>;dbname=<DB NAME> as <DB USER> (Exception: SQLSTATE[HY000] Unable to connect: Adaptive Server is unavailable or does not exist

The same script I ran on my previous CentOS Nagios instance works fine. I have confirmed the MSSQL Dataserver has my Ubuntu server white-listed


Is it easier if I just force a full install on the new Ubuntu server?


Regards,
Nelson

Re: Upgrade is Failing

Posted: Fri Aug 09, 2019 8:48 am
by scottwilkerson
nelsonw wrote:Is it easier if I just force a full install on the new Ubuntu server?
You can try that but I would make a good backup first.

I'm not sure of the process you used in the migration so that may be the best bet.

Re: Upgrade is Failing

Posted: Fri Aug 09, 2019 10:17 am
by nelsonw
Hi Scott,

I followed the steps in https://assets.nagios.com/downloads/nag ... ios-XI.pdf to do the migration. Reading through this again, it does mention to have Nagios installed before restoring the backup, so I suspect doing a full install would not resolve the problem.

Please advise why I am receiving the following error when attempting connection to a MSSQL database
Could not connect to dblib:host=<DB Host>:<PORT>;dbname=<DB NAME> as <DB USER> (Exception: SQLSTATE[HY000] Unable to connect: Adaptive Server is unavailable or does not exist.

The script works fine when connecting from my previous CentOS NagiosXI install


I have installed both php-sybase and php7.2-sybase. I still receive the above error


Regards,
Nelson