xi 5.8.6 NDO
-
- Posts: 114
- Joined: Tue Aug 15, 2017 1:58 am
xi 5.8.6 NDO
Hi,
We are currently running xi 5.8.1, with offloaded databases and Mod-Gearman. When we upgraded to xi 5.8.1 we experienced an issue with NDO3 and were advised by Nagios support to downgrade NDO3 to ndomod via support call #532639 which we did.
We are beginning to look at upgrading to 5.8.6 to fix security vulnerabilities.
Have the issues with NDO3 been resolved since 5.8.1?
What would the be the recommended approach to upgrade xi if it has not been fully resolved? I can't find any reference to NDO in the upgrade instructions pdf online.
Thanks,
Andy
We are currently running xi 5.8.1, with offloaded databases and Mod-Gearman. When we upgraded to xi 5.8.1 we experienced an issue with NDO3 and were advised by Nagios support to downgrade NDO3 to ndomod via support call #532639 which we did.
We are beginning to look at upgrading to 5.8.6 to fix security vulnerabilities.
Have the issues with NDO3 been resolved since 5.8.1?
What would the be the recommended approach to upgrade xi if it has not been fully resolved? I can't find any reference to NDO in the upgrade instructions pdf online.
Thanks,
Andy
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: xi 5.8.6 NDO
HI Andy,
There were some important updates to NDO3 in the 5.8.5 release. The upgrade script will not force an upgrade downgraded ndo systems, so you can upgrade to the latest version without impacting the backend database (ndo).
Do you have a test system set up to try out the latest version of NDO3 without affecting the production monitoring server? That would be the recommend approached here as the system has had some customization.
--Benjamin
There were some important updates to NDO3 in the 5.8.5 release. The upgrade script will not force an upgrade downgraded ndo systems, so you can upgrade to the latest version without impacting the backend database (ndo).
Do you have a test system set up to try out the latest version of NDO3 without affecting the production monitoring server? That would be the recommend approached here as the system has had some customization.
--Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 114
- Joined: Tue Aug 15, 2017 1:58 am
Re: xi 5.8.6 NDO
Hi Benjamin,
We have a test system but it is very small compared to our live system. It was only in our larger live system that we experienced the problem with NDO3.
Are there any occurrences of people seeing issues with large installations and NDO3 in xi 5.8.6?
I also need to ask if xi 5.8.6 is fully compatible with Mod-Gearman v3.0.7?
Thanks,
Andy
We have a test system but it is very small compared to our live system. It was only in our larger live system that we experienced the problem with NDO3.
Are there any occurrences of people seeing issues with large installations and NDO3 in xi 5.8.6?
I also need to ask if xi 5.8.6 is fully compatible with Mod-Gearman v3.0.7?
Thanks,
Andy
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: xi 5.8.6 NDO
Hi,
For the first question, not necessarily. If you did not have an issue with exceeding the kernel message queues, then using ndo2db is a good option.
You can upgrade to NDO3 and then check the nagios.log for any errors. In most cases, those can be resolved those by examining the database table settings. I can provide steps for upgrading to ndo3 if you'd like.
That's correct, the latest version will work with v3.0.7.
See: Integrating Mod-Gearman With Nagios xi
For the first question, not necessarily. If you did not have an issue with exceeding the kernel message queues, then using ndo2db is a good option.
You can upgrade to NDO3 and then check the nagios.log for any errors. In most cases, those can be resolved those by examining the database table settings. I can provide steps for upgrading to ndo3 if you'd like.
That's correct, the latest version will work with v3.0.7.
See: Integrating Mod-Gearman With Nagios xi
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 114
- Joined: Tue Aug 15, 2017 1:58 am
Re: xi 5.8.6 NDO
Hi,
Yes if you can provide the steps to upgrade to ndo3 that would be good.
Are the steps to downgrade to ndo2db if needed still the same as we were provided with in the support ticket?
Yes if you can provide the steps to upgrade to ndo3 that would be good.
Are the steps to downgrade to ndo2db if needed still the same as we were provided with in the support ticket?
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: xi 5.8.6 NDO
Hi,
To upgrade back to ndo3, download you version of Nagios xi, and unpack the archive and run the upgrade command.
Yes, the same steps to downgrade will work. For a system with a local database, they are:
Then edit your /usr/local/nagios/etc/nagios.cfg and make sure this line is uncommented:
Make sure this line is commented:
Then start the nagios services:
To upgrade back to ndo3, download you version of Nagios xi, and unpack the archive and run the upgrade command.
Code: Select all
cd /tmp
rm -rf /tmp/nagiosxi
wget https://assets.nagios.com/downloads/nagiosxi/5/xi-latest.tar.gz
tar xzf xi-latest.tar.gz
cd nagiosxi/subcomponents/ndo
./upgrade -f
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/subcomponents/ndoutils
./install
systemctl enable ndo2db
Code: Select all
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
Code: Select all
#broker_module=/usr/local/nagios/bin/ndo.so /usr/local/nagios/etc/ndo.cfg
Code: Select all
systemctl start nagios
systemctl start ndo2db
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 114
- Joined: Tue Aug 15, 2017 1:58 am
Re: xi 5.8.6 NDO
Hi,
I've come back to looking at this. I tried upgrading ndo2db to ndo3 on a test server.
The upgrade appeared to work but ndo3 doesn't seem to start correctly when the server is rebooted.
The /usr/local/nagios/var/nagios.log shows:
A manual restart of the nagios service then kicks it back into life:
Do you have any way to troubleshoot why it won't start after a reboot?
I've come back to looking at this. I tried upgrading ndo2db to ndo3 on a test server.
The upgrade appeared to work but ndo3 doesn't seem to start correctly when the server is rebooted.
The /usr/local/nagios/var/nagios.log shows:
Code: Select all
[1637070498] Local time is Tue Nov 16 13:48:18 GMT 2021
[1637070498] LOG VERSION: 2.0
[1637070498] qh: Socket '/usr/local/nagios/var/rw/nagios.qh' successfully initialized
[1637070498] qh: core query handler registered
[1637070498] qh: echo service query handler registered
[1637070498] qh: help for the query handler registered
[1637070498] wproc: Successfully registered manager as @wproc with query handler
[1637070498] wproc: Registry request: name=Core Worker 1269;pid=1269
[1637070498] wproc: Registry request: name=Core Worker 1268;pid=1268
[1637070498] wproc: Registry request: name=Core Worker 1267;pid=1267
[1637070498] wproc: Registry request: name=Core Worker 1270;pid=1270
[1637070498] NDO-3: NDO 3.0.7 (c) Copyright 2009-2020 Nagios - Nagios Core Development Team
[1637070499] NDO-3: Unable to connect to mysql. Configuration may be incorrect or database may have temporarily disconnected.
[1637070499] NDO-3: NDO was not able to initialize the database (main context) and will not start.
[1637070499] Event broker module '/usr/local/nagios/bin/ndo.so' initialized successfully.
[1637070499] mod_gearman: initialized version 3.0.7 (libgearman 0.33)
[1637070499] Event broker module '/usr/lib64/mod_gearman/mod_gearman_nagios4.o' initialized successfully.
[1637070505] Successfully launched command file worker with pid 2618
Code: Select all
systemctl restart nagios
Code: Select all
[1637071832] Local time is Tue Nov 16 14:10:32 GMT 2021
[1637071832] LOG VERSION: 2.0
[1637071832] qh: Socket '/usr/local/nagios/var/rw/nagios.qh' successfully initialized
[1637071832] qh: core query handler registered
[1637071832] qh: echo service query handler registered
[1637071832] qh: help for the query handler registered
[1637071832] wproc: Successfully registered manager as @wproc with query handler
[1637071832] wproc: Registry request: name=Core Worker 9982;pid=9982
[1637071832] wproc: Registry request: name=Core Worker 9983;pid=9983
[1637071832] wproc: Registry request: name=Core Worker 9984;pid=9984
[1637071832] wproc: Registry request: name=Core Worker 9985;pid=9985
[1637071832] NDO-3: NDO 3.0.7 (c) Copyright 2009-2020 Nagios - Nagios Core Development Team
[1637071832] NDO-3: Callbacks registered
[1637071832] NDO-3: Callbacks registered
[1637071832] Event broker module '/usr/local/nagios/bin/ndo.so' initialized successfully.
[1637071832] mod_gearman: initialized version 3.0.7 (libgearman 0.33)
[1637071832] Event broker module '/usr/lib64/mod_gearman/mod_gearman_nagios4.o' initialized successfully.
[1637071832] NDO-3: Started event_handler thread
[1637071832] NDO-3: Started timed_event thread
[1637071832] NDO-3: Started host_check thread
[1637071832] NDO-3: Started service_check thread
[1637071832] NDO-3: Started comment thread
[1637071832] NDO-3: Started downtime thread
[1637071832] NDO-3: Started flapping thread
[1637071832] NDO-3: Started service_status thread
[1637071832] NDO-3: Started host_status thread
[1637071832] NDO-3: Started contact_status thread
[1637071832] NDO-3: Started acknowledgement thread
[1637071832] NDO-3: Started statechange thread
[1637071832] NDO-3: Started notification thread
[1637071833] NDO-3: Ended contact_status thread
[1637071833] NDO-3: Ended host_check thread
[1637071833] NDO-3: Ended host_status thread
[1637071833] NDO-3: Ended service_check thread
[1637071833] NDO-3: Ended flapping thread
[1637071833] NDO-3: Ended statechange thread
[1637071833] NDO-3: Ended acknowledgement thread
[1637071833] NDO-3: Ended downtime thread
[1637071833] NDO-3: Ended timed_event thread
[1637071833] NDO-3: Ended notification thread
[1637071833] NDO-3: Ended event_handler thread
[1637071833] NDO-3: Ended comment thread
[1637071833] NDO-3: Ended service_status thread
[1637071838] Successfully launched command file worker with pid 10018
-
- Dreams In Code
- Posts: 7682
- Joined: Wed Feb 11, 2015 12:54 pm
Re: xi 5.8.6 NDO
The only thing I can think is that the nagios service is starting up before the database is fully started.
What is the output of these commands:
What is the output of these commands:
Code: Select all
systemctl status nagios | head -9
cat /usr/lib/systemd/system/nagios.service
uname -a
cat /etc/*release
-
- Posts: 114
- Joined: Tue Aug 15, 2017 1:58 am
Re: xi 5.8.6 NDO
This is the output of the commands after a reboot of the server:
Code: Select all
systemctl status nagios | head -9
● nagios.service - LSB: Starts and stops the Nagios monitoring server
Loaded: loaded (/etc/rc.d/init.d/nagios; bad; vendor preset: disabled)
Active: active (running) since Wed 2021-11-17 09:29:21 GMT; 5min ago
Docs: man:systemd-sysv-generator(8)
Process: 1078 ExecStart=/etc/rc.d/init.d/nagios start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/nagios.service
├─1360 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
├─1369 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
├─1370 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
Code: Select all
cat /usr/lib/systemd/system/nagios.service
cat: /usr/lib/systemd/system/nagios.service: No such file or directory
Code: Select all
uname -a
Linux TESTSERVER 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Code: Select all
CentOS Linux release 7.3.1611 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
CentOS Linux release 7.3.1611 (Core)
-
- Posts: 1288
- Joined: Tue Jun 01, 2021 1:27 pm
Re: xi 5.8.6 NDO
Hello @andyb4u
Thanks for following up, want to go ahead and verify @ssax's thoughts that the 'nagios.service' is starting up before database and ndo-3 get settled in by putting in a delay with xx seconds:
Please make sure that you make a backup before making changes to the systemd.
Thanks,
Perry
Thanks for following up, want to go ahead and verify @ssax's thoughts that the 'nagios.service' is starting up before database and ndo-3 get settled in by putting in a delay with xx seconds:
Code: Select all
vi /etc/systemd/system/multi-user.target.wants/nagios.service
Then run:[Unit]
Description=Nagios Core 4.4.6
Documentation=https://www.nagios.org/documentation
After=network.target local-fs.target mysqld.service
[Service]
Type=forking
ExecStartPre=/bin/sleep 15
ExecStartPre=/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
ExecStart=/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
ExecStop=/usr/bin/kill -s TERM ${MAINPID}
ExecStopPost=/usr/bin/rm -f /usr/local/nagios/var/rw/nagios.cmd
ExecReload=/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
ExecReload=/usr/bin/kill -s HUP ${MAINPID}
[Install]
WantedBy=multi-user.target
Code: Select all
systemctl daemon-reload
Code: Select all
systemctl restart nagios
Thanks,
Perry