Page 1 of 2

DB2 monitoring error check_db2_health

Posted: Wed Sep 18, 2013 10:25 pm
by jsburge
We are trying to install Nagios XI and have it monitor our lock waits on the DB2 AIX servers. We can get the NRPE installed and monitor the CPU and drive space. The last piece that we need to clear this for purchase is the DB2 monitoring. We are using the check_db2_health addon. The prerequisite for this is the installation of Perl-Module DBD::DB2. The error we are getting is:

root@qwmsdb201:/opt/nagios/libexec# ./check_db2_health --username=nagios --password=nagios --database=AWGQA --mode=lock-waits
CRITICAL - cannot connect to AWGQA. install_driver(DB2) failed: Can't load '/usr/opt/perl5/lib/site_perl/5.8.8/aix-thread-multi/auto/DBD/DB2/DB2.so' for module DBD::DB2: rtld: 0712-001 Symbol SQLCancel was referenced
from module /usr/opt/perl5/lib/site_perl/5.8.8/aix-thread-multi/auto/DBD/DB2/DB2.so(), but a runtime definition
of the symbol was not found.
rtld: 0712-001 Symbol SQLFreeStmt was referenced
from module /usr/opt/perl5/lib/site_perl/5.8.8/aix-thread-multi/auto/DBD/DB2/DB2.so(), but a runtime definition
of the symbol was not found.
rtld: 0712-001 Symbol SQLAllocHandle was referenced
from module /usr/opt/perl5/lib/site_perl/5.8.8/aix-thread-multi/auto/DBD/DB2/DB2.so(), but a runtime definition
of the symbol was not found.
rtld: 0712-001 Symbol SQLGetSubString was referenced
from module /usr/opt/perl5/lib/site_perl/5.8.8/aix-thread-multi/auto/DBD/DB2/DB2.so(), but a runtime definition
of the symbol was not found.
rtld: 0712-001 Symbol SQLFreeHandle was referenced
from module /usr/opt/perl5/lib/site_perl/5.8.8/aix-thread-multi/auto/DBD/DB2/DB2.so(), but a runtime definition
of the symbol was not found.
rtld: 0712-001 Symbol SQLGetData was referenced
from module /usr/opt/perl5/lib/site_perl/5.8.8/aix-thread-multi/auto/DBD/DB2/DB2.so(), but a runtime definition
of the symbol was not found.
rtld: 0712-001 Symbol SQLGetLength was referenced
from module /usr/opt/perl5/lib/site_perl/5.8.8/aix-thread-multi/auto/DBD/DB2/DB2.so(), but a runtime definition
of the symbol was not found.
Additional errors occurred but are not reported. at /usr/opt/perl5/lib/5.8.8/aix-thread-multi/DynaLoader.pm line 230.
at (eval 12) line 3
Compilation failed in require at (eval 12) line 3.
Perhaps a required shared library or dll isn't installed where expected
at ./check_db2_health line 1964

We have all the prerequisite files loaded. This is the last piece we need to get Nagios XI approved for purchase. Does anyone know why this would error out?
Thanks,
Scott
Associated Wholesale Grocers

Re: DB2 monitoring error check_db2_health

Posted: Thu Sep 19, 2013 2:38 pm
by slansing
Where do you have this plugin script located? What directory? Did you try running it straight out of the untarred db2 file you downloaded from console labs?

If you just run the plugin without arguments you should get it's help output, try this, and also run the following and share the output here:

Code: Select all

yum install cpan

Code: Select all

cpan

Code: Select all

install DBD::DB2

Re: DB2 monitoring error check_db2_health

Posted: Sun Sep 22, 2013 8:53 pm
by jsburge
The plugin is installed in the /opt/nagios/libexec folder with the rest of the NRPE check files.

The file is not being run from an untarred download.

Our AIX team installed DBD::DB2 and the files that the output says are missing are right where it is looking for them.

The arguments appear to be valid based on the system and what I can find.

I will have to check with the AIX team before I can download and install cpan.

Re: DB2 monitoring error check_db2_health

Posted: Mon Sep 23, 2013 10:29 am
by lmiltchev
Did you install DBD::DB2 after after you installed the plugin? Did you configure it with the proper options?
–prefix=BASEDIRECTORY The base directory of the Nagios installation (default: /usr/local/nagios). The final destination for check_db2_health will be the libexec subdirectory.

Re: DB2 monitoring error check_db2_health

Posted: Tue Sep 24, 2013 5:13 pm
by jsburge
I was able to run CPAN. However when I try to update it or install DBD::DB2 I get an out of memory error even though I have an unlimited ulimit.

cpan> install Bundle::CPAN
CPAN: Storable loaded ok
Going to read /home/wmsqa/.cpan/sources/authors/01mailrc.txt.gz
Going to read /home/wmsqa/.cpan/sources/modules/02packages.details.txt.gz
Database was generated on Mon, 23 Sep 2013 23:53:03 GMT
CPAN: HTTP::Date loaded ok

There's a new CPAN.pm version (v2.00) available!
[Current version is v1.7602]
You might want to try
install Bundle::CPAN
reload cpan
without quitting the current session. It should be a seamless upgrade
while we are running...

Out of memory!
Out of memory!
Memory fault(coredump)

Re: DB2 monitoring error check_db2_health

Posted: Wed Sep 25, 2013 2:53 pm
by lmiltchev
You can probably try the solution, listed here:

http://stackoverflow.com/questions/1110 ... ry-on-unix

Let us know if this fixed the "Out of memory!" issue.

Re: DB2 monitoring error check_db2_health

Posted: Wed Oct 16, 2013 12:28 am
by jsburge
I fixed the memory issue. By changing the ulimit myself. (It was low) CPAN was able to install DBD::DB2 but it was already up to date. I still get the same error.

http://www-01.ibm.com/support/docview.w ... wg21297335 Suggests that the DB2 library path needs to be set with an export. This did not help.

I get errors running this from command line both on the AIX and the NagiosXI servers.

Re: DB2 monitoring error check_db2_health

Posted: Wed Oct 16, 2013 11:47 am
by abrist
It looks like it needs 2 exports:

Code: Select all

$ export DB2_HOME=<location where db2 is installed>
$ export DB2LIB=<location where db2 is installed>/lib[64/32]
Did you try with both?

Re: DB2 monitoring error check_db2_health

Posted: Tue Oct 22, 2013 4:57 pm
by jsburge
Yes, I tried the exports. I am still getting the same errors.

Re: DB2 monitoring error check_db2_health

Posted: Wed Oct 23, 2013 3:24 pm
by abrist
What are the errors at this point?