RESTORE: ndo2db is not running but subsystem locked

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
FrancisNagios
Posts: 58
Joined: Tue Apr 09, 2019 6:54 am

Re: RESTORE: ndo2db is not running but subsystem locked

Post by FrancisNagios »

Hi,

I installed the MDOUTILS.

When you run the command: "/ usr / local / nagios / bin / ndo2db -c /usr/local/nagios/etc/ndo2db.cfg -f", NagiosXIRedHat started workimg but there were modules that were not refreshed and updated
Since it did not return the prompt after 1 hour, I restarted the machine and it is not failing in the Database Backend component.

But there is an error when performing the "Run verification command" to test a service in Configure --> Monitoring --> Services

Example 1:
No result is displayed on the screen although from the NagiosXIRedHat server if it gives the value correctly as in Status information from the Home
1.PNG

Code: Select all

[root @ nagiosxi-rh libexec] # / usr / local / nagios / libexec / check_nt -H 10.16.80.218 -s "123456" -p 12489 -v USEDDISKSPACE -l D -w 80 -c 95 D: \ - total: 20.00 Gb - used: 7.39 Gb (37%) - free 12.60 Gb (63%) | 'D: \ Space used' = 7.39Gb; 16.00; 19.00; 0.00; 20.00
 
Example 2:
Give an error on the screen even though from the NagiosXIRedHat server if it gives the value correctly as in Status information from the Home
2.PNG

Code: Select all

[root @ nagiosxi-rh libexec] # / usr / local / nagios / libexec / check_nrpe -H affirm-pro1.perimetral.dom -t 60 -c check_mem -a '-w 20 -c 10' OK - 2052/5802 MB (35%) Free memory, Used: 3731 MB, Shared: 130 MB, Buffers + Cached: 1772 MB | total = 5802MB free = 2052MB used = 3731MB shared = 130MB buffers_and_cached = 1772MB
 
Note: In NagiosXICentos There was results on the screen of these two example services
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: RESTORE: ndo2db is not running but subsystem locked

Post by tgriep »

The ndo2db command I had you run was for testing purposes but is looks like it is running now.

The SQL error that you are seeing is because of a setting that has to be changed on newer versions of the Postgres database that is running on your server.
This KB article has the instructions for doing that.
https://support.nagios.com/kb/article/n ... r-754.html

Try it out and let us know how it works.
Be sure to check out our Knowledgebase for helpful articles and solutions!
FrancisNagios
Posts: 58
Joined: Tue Apr 09, 2019 6:54 am

Re: RESTORE: ndo2db is not running but subsystem locked

Post by FrancisNagios »

Hi,

Thank you very much, the problem was solved by following the instructions in the article --> https://support.nagios.com/kb/article/n ... r-754.html

We have one last question to close this issue

We want to update two working weeks of NagiosCentos to NagiosRh, I understand that doing again the backup from NagiosCentos to NagiosRh can give us the same problems or even more, could it be done in this way --> https://assets.nagios.com/downloads/ nagiosxi / docs / Importing_Config_Files_Into_XI.pdf, so you would only add the new hosts, services, contact .... or on the contrary, would information double?

Thanks and Regards
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: RESTORE: ndo2db is not running but subsystem locked

Post by tgriep »

Instead of doing the backup and restore, you could follow the Importing Config files document to get the new Hosts, Services, etc. in to the new system.
As long as the object names are the same and the Overwrite Database button is checked, that should eliminate duplicates in the configs.
Be sure to check out our Knowledgebase for helpful articles and solutions!
FrancisNagios
Posts: 58
Joined: Tue Apr 09, 2019 6:54 am

Re: RESTORE: ndo2db is not running but subsystem locked

Post by FrancisNagios »

Hi,

The migration has been done and everything has been validated correctly, but the plugins, the VMWARE and the check_jmx4perl fail to close this migration process.

1)VMWARE:
It has been installed following this document: https://assets.nagios.com/downloads/nag ... ios-XI.pdf
The perrequisites have been installed and version 5.5.0 has been installed I have tried the 5.1.0 that we already had in centos.
I attache evidences of the inslalación
VMWARE.txt
But the services are still fail:
(No output on stdout) stderr: Can't locate Nagios/Plugin.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/nagios/libexec/c
BEGIN failed--compilation aborted at /usr/local/nagios/libexec/check_esx3.pl line 31
Even commenting that the installation has been correct, in VMWARE wizzards gives this error:
Error: It appears as though you have not installed the VMware SDK or ESX plugins on your Nagios XI server. You must have these components properly installed on your system before using this wizard.
To complete the installation of the required components please follow the Monitoring VMware with Nagios XI documentation.
I attach the command:
Captura.PNG


2)Checl_jmx4perl:
It has been installed following this document: https://assets.nagios.com/downloads/nag ... 1556276028
But the services are still fail :
(No output on stdout) stderr: execvp(/usr/local/bin/check_jmx4perl, ...) failed. errno is 2: No such file or directory
En /usr/local/bin/ no encientra el check4perl, entiendo que falta algo por instalar.
I attach the command:
Captura3.PNG
Thanks and regards
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: RESTORE: ndo2db is not running but subsystem locked

Post by tgriep »

It looks like there is a missing perl module for the VMWare plugin and to install it, run the following as root.

Code: Select all

yum install perl-Nagios-Plugin -y
Then test the VMWare plugin again.

The command for the JMX plugin has the wrong path to the plugin and here is how to fix it.
Login to the XI GUI and go to the Core Config Manager > Commands menu and edit all of the JMX commands.

Change the path in all of the commands from

Code: Select all

/us/local/bin
to

Code: Select all

/usr/local/nagios/libexec
Save the changes and apply the config and test the commands in XI.
Be sure to check out our Knowledgebase for helpful articles and solutions!
FrancisNagios
Posts: 58
Joined: Tue Apr 09, 2019 6:54 am

Re: RESTORE: ndo2db is not running but subsystem locked

Post by FrancisNagios »

Hi,

- About VMWARE

This is the result of the installation of the library:

Code: Select all

[root@nagiosxi-rh libexec]# yum install perl-Nagios-Plugin -y
Complements loaded:product-id, search-disabled-repos, subscription-manager
No package available perl-Nagios-Plugin.
Error: Nothing to do
 And it was installed manually:

Code: Select all

[root@nagiosxi-rh administrador]# rpm -qa | grep -i perl-nagios-plugin
perl-Nagios-Plugin-0.36-7.el7.noarch
But still giving the same error.
But after being with VMWARE and JMX this errror is new:
vmware2.PNG
I attach a serie of installations that we have tried to carry out and the Plugin.pm routes in NagiosXICENTOS that works as in NagisoXiRH that does not work.
VMWARE.txt
    
- About JMX (check_jmx4perl):
Still changing the PATH  de /usr/local/bin a /usr/local/nagios/libexec still giving the same error because you can not find the check_jmx4perl on any of the two routes    ​
It seems that it is not installed.
   
For this plugin, I did the following:

Code: Select all

cd /usr/local/nagios/libexec/
wget -O check_jmx "https://raw.githubusercontent.com/WillPlatnick/jmxquery/master/plugin/check_jmx" 
wget -O jmxquery.jar "https://github.com/WillPlatnick/jmxquery/raw/master/plugin/jmxquery.jar" 
chmod +x *jmx* chown nagios:nagios *jmx*
Thanks and regards
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: RESTORE: ndo2db is not running but subsystem locked

Post by tgriep »

Run the following as root and post the output here.

Code: Select all

yum repolist
yum list installed
Missed one thing, change plugin name from check_jmx4perl to just check_jmx

The VMWare SOAP error, try the following to fix it.
Try downgrading the LWP perl module by running the following commands:

Code: Select all

cd /tmp
wget https://www.cpan.org/modules/by-module/LWP/GAAS/libwww-perl-5.837.tar.gz
tar xvf libwww-perl-5.837.tar.gz
cd libwww-perl-5.837/
perl Makefile.PL
make
make test
make install
Run this to test the plugin and print out the version of it.

Code: Select all

/usr/local/nagios/libexec/check_esx3.pl -V
It prints the version without any errors, try running the check again.
Be sure to check out our Knowledgebase for helpful articles and solutions!
FrancisNagios
Posts: 58
Joined: Tue Apr 09, 2019 6:54 am

Re: RESTORE: ndo2db is not running but subsystem locked

Post by FrancisNagios »

Hi,

I attache evidences of the yum
yum.txt
I change plugin name from check_jmx4perl to just check_jmx but shows this error:

Code: Select all

[root@nagiosxi-rh libexec]# ./check_jmx --timeout=10 --url=http://VMEXPLEGACY64.trabajo.dom:8080/jolokia --config=/usr/local/nagios/etc/jmx4perl/memory.cfg --check=memory_heap 90 80
./check_jmx: línea 6: java: no se encontró la orden
I attache evidences of the LWP perl module:
LWP.txt
This is the output of the plugin test

Code: Select all

[root@nagiosxi-rh libwww-perl-5.837]# /usr/local/nagios/libexec/check_esx3.pl -V
check_esx3.pl 0.5.0
This is the output of the check_esx3.pl, but it keeps showing the error but it also shows the correct result but in nagios the alert is critical

Code: Select all

[root@nagiosxi-rh libexec]# ./check_esx3.pl -H esxbigdata.trabajo.dom -f /usr/local/nagiosxi/etc/components/vmware/monitorizacion.txt -l CPU
length() used on @array (did you mean "scalar(@array)"?) at /usr/lib64/perl5/IO/Compress/Zlib/Extra.pm line 198, <AUTH_FILE> line 2.
CHECK_ESX3.PL OK - cpu usage=5987.00 MHz (10.71%) | cpu_usagemhz=5987.00Mhz;; cpu_usage=10.71%;;
Thanks and regards
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: RESTORE: ndo2db is not running but subsystem locked

Post by tgriep »

The jmx plugin needs java installed so run this to do that.

Code: Select all

yum install java -y

The check_esx3 plugin is almost working but it is a very old version so I recommend upgrading it and here is how to do that.

First, login to the XI server as root and make a backup of the existing one by running the following.

Code: Select all

cp /usr/local/nagios/libexec/check_esx3.pl /usr/local/nagios/libexec/check_esx3.pl.old
Then run the following to install a required Perl Module for the new plugin.

Code: Select all

yum install perl-Nagios-Monitoring-Plugin
Then download this updated plugin to your PC.
https://github.com/shinken-monitoring/p ... ck_esx3.pl

After it is downloaded, login to the XI GUI and go to the Admin > Manage Plugins menu
Browse to the new plugin and then click on the Upload Button.

Run the test again to see if it works.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked