NDO and upgrade from 5.8.4 to 5.8.5

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
steph007
Posts: 177
Joined: Mon Jul 24, 2017 12:00 pm

NDO and upgrade from 5.8.4 to 5.8.5

Post by steph007 »

Hi,

I'm still using NDO2 and not NDO3 for performance issues with NDO3.
When I have upgraded to 5.8.4, the NDO2 was still there after the upgrade.
Now it's look like when I have upgraded my test system to 5.8.5, NDO2 has been replaced by NDO3.
Is it normal?
Does I need only to change the nagios.cfg file to revert to NDO2?
Should I now use NDO3?
steph007
Posts: 177
Joined: Mon Jul 24, 2017 12:00 pm

Re: NDO and upgrade from 5.8.4 to 5.8.5

Post by steph007 »

On my test system, I have revert to NDO and restart Nagios. but I have this in nagios.log:
[1629204994] Error: Could not load module '/usr/local/nagios/bin/ndomod.o' -> /usr/local/nagios/bin/ndomod.o: cannot open shared object file: No such file or directory
[1629204994] Error: Failed to load module '/usr/local/nagios/bin/ndomod.o'.

Look like it's not possible to use anymore NDO2?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: NDO and upgrade from 5.8.4 to 5.8.5

Post by ssax »

Did you install via OVA, source, RPM, or the offline package? It should have left NDO2DB in place, the only way I can see it removing it would be if you have an RPM or offline installed system.

You can still run NDO2DB, a lot of customers are using NDO3 but some have issues, I'd probably give it a try.

To see if NDO3 will work for you, you can edit your /usr/local/nagios/etc/nagios.cfg and make sure this line is commented:

Code: Select all

#broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
Make sure this line is uncommented:

Code: Select all

broker_module=/usr/local/nagios/bin/ndo.so /usr/local/nagios/etc/ndo.cfg
Then restart the nagios service:

Code: Select all

systemctl restart nagios
Then Apply Configuration and validate.


If you have issues, you can downgrade back to NDO2DB by running these commands as root:

Code: Select all

systemctl stop nagios
cd /tmp
rm -rf /tmp/nagiosxi
wget https://assets.nagios.com/downloads/nagiosxi/5/xi-5.6.14.tar.gz
tar zxf xi-5.6.14.tar.gz
cd /tmp/nagiosxi
./init.sh
cd /tmp/nagiosxi/subcomponents/ndoutils
./install
systemctl enable ndo2db
If you have an offloaded database OR you've change the nagios DB user/pass you will need to edit your /usr/local/nagios/etc/ndo2db.cfg file and update these before running the next command to start it up:
- You can get the info from your /usr/local/nagios/etc/ndo.cfg or from /usr/local/nagiosxi/html/config.inc.php

Code: Select all

db_host
db_port
db_user
db_pass
Then run this command to start it up.:

Code: Select all

systemctl start ndo2db
Then edit your /usr/local/nagios/etc/nagios.cfg and make sure this line is uncommented:

Code: Select all

broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
Make sure all occurrences of this line are commented:

Code: Select all

#broker_module=/usr/local/nagios/bin/ndo.so /usr/local/nagios/etc/ndo.cfg
Then start the nagios service:

Code: Select all

systemctl start nagios
Then Apply Configuration and validate.
steph007
Posts: 177
Joined: Mon Jul 24, 2017 12:00 pm

Re: NDO and upgrade from 5.8.4 to 5.8.5

Post by steph007 »

Hi,

This is a OVA image downloaded from Nagios. CentOS7.
For the last update, to 5.8.4 I did not do anything special and I left on NDO2.
Now with the update to 5.8.5 it seem nothing of NDO2 is there.

After the update, I saw in the nagios.cfg that NDO was active and NDO2 in comments.
I change that and restart nagios without sucess.
After, I installed the NDO2 package from xi-5.6.14.tar.gz and change the pw in ndo2db.cfg. I goes better, but not perfect. I have now those errors:
[Tue Aug 17 16:00:08 2021] ndomod: NDOMOD 2.1.3 (2017-04-13) Copyright (c) 2009 Nagios Core Development Team and Community Contributors
[Tue Aug 17 16:00:08 2021] ndomod: Successfully connected to data sink. 13 queued items to flush.
[Tue Aug 17 16:00:08 2021] ndomod: Successfully flushed 13 queued items to data sink.
....
[Tue Aug 17 16:00:08 2021] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
[Tue Aug 17 16:00:08 2021] ndomod: Error writing to data sink! Some output may get lost...
[Tue Aug 17 16:00:08 2021] ndomod: Please check remote ndo2db log, database connection or SSL Parameters
[Tue Aug 17 16:00:14 2021] Successfully launched command file worker with pid 7470
[Tue Aug 17 16:00:26 2021] ndomod: Successfully reconnected to data sink! 0 items lost, 341 queued items to flush.
[Tue Aug 17 16:00:26 2021] ndomod: Error writing to data sink! Some output may get lost. 91 queued items to flush.
[Tue Aug 17 16:00:47 2021] ndomod: Successfully reconnected to data sink! 0 items lost, 116 queued items to flush.
[Tue Aug 17 16:00:47 2021] ndomod: Successfully flushed 116 queued items to data sink.
[Tue Aug 17 16:00:47 2021] ndomod: Error writing to data sink! Some output may get lost...
[Tue Aug 17 16:00:47 2021] ndomod: Please check remote ndo2db log, database connection or SSL Parameters
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: NDO and upgrade from 5.8.4 to 5.8.5

Post by ssax »

Edit this file:

Code: Select all

/usr/local/nagios/etc/ndo2db.cfg
Make sure these are set:

Code: Select all

db_host
db_port
db_user
db_pass
To what you have in /usr/local/nagiosxi/html/config.inc.php for these:

Code: Select all

    "ndoutils" => array(
        "dbtype" => 'mysql',
        "dbserver" => 'localhost',
        "user" => 'ndoutils',
        "pwd" => 'n@gweb',
        "db" => 'nagios',
You can test the credentials like this:

Code: Select all

mysql -h localhost -undoutils -p'n@gweb' nagios
Then restart the services like this:

Code: Select all

systemctl stop nagios
systemctl restart ndo2db
systemctl start nagios
steph007
Posts: 177
Joined: Mon Jul 24, 2017 12:00 pm

Re: NDO and upgrade from 5.8.4 to 5.8.5

Post by steph007 »

Look better now.
I think I forgot to restart ndo2 after have changed the pw in ndo2db.cfg

But do you know why I had to do that for that upgrade?
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: NDO and upgrade from 5.8.4 to 5.8.5

Post by vtrac »

I believed that RPM package updated all NDO packages in your last upgrade.

Vinh
steph007
Posts: 177
Joined: Mon Jul 24, 2017 12:00 pm

Re: NDO and upgrade from 5.8.4 to 5.8.5

Post by steph007 »

I have update my prod environment, from 5.8.4 to 5.8.5, exactly like I did for my test environment, and NDO2 remained in place!
Strange because I almost not touching my test environment compare to the prod.

The important is all is good now. Thanks!
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: NDO and upgrade from 5.8.4 to 5.8.5

Post by vtrac »

Great!! ... locking thread ... :-)
Locked