Page 1 of 1

Nagios XI 5.7 NDO Error

Posted: Mon Jun 08, 2020 1:58 pm
by fullsail
I have ran the upgrade to 5.7 on my Nagios XI environment and am not seeing any hosts/services. I do run an external NDO2DB server which I have upgraded. Looking at the nagios.log I see this error, Is this a simple fix or do I need to roll back.

[1591642501] NDO-3: ndo_return = 1 (Statement not prepared)
[1591642501] NDO-3: ndo_handle_service_status(ndo-handlers.c:952): Unable to bind parameters
[1591642501] NDO-3: ndo_return = 1 (Statement not prepared)
[1591642501] NDO-3: ndo_handle_service_status(ndo-handlers.c:952): Unable to bind parameters
[1591642501] NDO-3: ndo_return = 1 (Statement not prepared)
[1591642501] NDO-3: ndo_handle_service_status(ndo-handlers.c:952): Unable to bind parameters
[1591642501] NDO-3: ndo_return = 1 (Statement not prepared)
[1591642501] NDO-3: ndo_handle_service_status(ndo-handlers.c:952): Unable to bind parameters
[1591642501] NDO-3: ndo_return = 1 (Statement not prepared)
[1591642501] NDO-3: ndo_handle_service_status(ndo-handlers.c:952): Unable to bind parameters
[1591642501] NDO-3: ndo_return = 1 (Statement not prepared)
[1591642501] NDO-3: ndo_handle_service_status(ndo-handlers.c:952): Unable to bind parameters
[1591642501] NDO-3: ndo_return = 1 (Statement not prepared)
[1591642501] NDO-3: ndo_handle_service_status(ndo-handlers.c:952): Unable to bind parameters
[1591642501] NDO-3: ndo_return = 1 (Statement not prepared)
[1591642501] NDO-3: ndo_handle_host_status(ndo-handlers.c:860): Unable to bind parameters
[1591642501] NDO-3: ndo_return = 1 (Statement not prepared)
[1591642501] NDO-3: ndo_handle_host_status(ndo-handlers.c:860): Unable to bind parameters
[1591642501] NDO-3: ndo_return = 1 (Statement not prepared)
[1591642501] NDO-3: ndo_handle_host_status(ndo-handlers.c:860): Unable to bind parameters
[1591642501] NDO-3: ndo_return = 1 (Statement not prepared)
[1591642501] NDO-3: ndo_handle_host_status(ndo-handlers.c:860): Unable to bind parameters
[1591642501] NDO-3: ndo_return = 1 (Statement not prepared)
[1591642501] NDO-3: ndo_handle_service_status(ndo-handlers.c:952): Unable to bind parameters
[1591642501] NDO-3: ndo_return = 1 (Statement not prepared)
[1591642501] NDO-3: ndo_handle_service_status(ndo-handlers.c:952): Unable to bind parameters
[1591642501] NDO-3: ndo_return = 1 (Statement not prepared)
[1591642501] NDO-3: ndo_handle_service_status(ndo-handlers.c:952): Unable to bind parameters
[1591642501] NDO-3: ndo_return = 1 (Statement not prepared)
[1591642501] NDO-3: ndo_handle_service_status(ndo-handlers.c:952): Unable to bind parameters
[1591642501] NDO-3: ndo_return = 1 (Statement not prepared)
[1591642501] NDO-3: ndo_handle_host_status(ndo-handlers.c:860): Unable to bind parameters
[1591642501] NDO-3: ndo_return = 1 (Statement not prepared)

Re: Nagios XI 5.7 NDO Error

Posted: Mon Jun 08, 2020 3:51 pm
by benjaminsmith
Hi @FullSail,

Since the database was offloaded, I believe this is a settings issue in the ndo configuration file. Go to vi /usr/local/nagios/etc/ndo.cfg, and find the following entry:

Code: Select all

db_host=localhost
And then change this to the location of the remote server.

Code: Select all

db_host=10.26.7.11
Additionally, there's a directive in that file for the database password, make sure that is set correctly, and let me know if the issue is resolved for you. If not, please send us a fresh system profile, temporarily roll it back and we'll review the logs to try and determine the cause. Thanks.

To send us your system profile.
Login to the Nagios XI GUI using a web browser
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and share this in a private message and then reply to this post to bring it up in the queue.

Re: Nagios XI 5.7 NDO Error

Posted: Mon Jun 08, 2020 4:03 pm
by swolf
Hi @FullSail,

I agree with everything Benjamin said, but I just wanted to add that you should be able to remove the ndo2db process/message queue entirely once we have this issue figured out. XI 5.7/NDO-3 handles everything from inside the main nagios process, so you should only need to configure the direct connection to the database.

Re: Nagios XI 5.7 NDO Error

Posted: Tue Jun 09, 2020 8:45 am
by fullsail
In the ndo.cfg the upgrade script pulled in the correct info.
db_user db_pass db_name db_host db_port are all set correctly. I am able to use MySQL client with the credentials and the connection works successfully. I have the upgraded system but it is now offline as we had rolled back. I will PM you a System Profile from the current production system (before upgrade on 5.6.14 with offloaded ndo/mysql. I will see if I can get a system profile off the one that was upgraded. Is there a command line I can run to pull it so that I don't have to bring it back up?

Re: Nagios XI 5.7 NDO Error

Posted: Tue Jun 09, 2020 10:32 am
by benjaminsmith
Hi FullSail,

I just replied to your private message, the profile was not attached to the message. Please try to send this once more. Thanks.

To generate a profile from the command line, run the following:

Code: Select all

/usr/local/nagiosxi/scripts/components/getprofile.sh support
# The profile will be in the following directory:
/usr/local/nagiosxi/var/components/profile.zip

Re: Nagios XI 5.7 NDO Error

Posted: Tue Jul 21, 2020 11:02 am
by fullsail
I waited for 5.7.2 and the upgrade completes without the errors here.

Re: Nagios XI 5.7 NDO Error

Posted: Tue Jul 21, 2020 2:19 pm
by benjaminsmith
I waited for 5.7.2 and the upgrade completes without the errors here.
That's good to hear!

Thanks for the update.

Benjamin