check_db2_health

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
qytmnet
Posts: 4
Joined: Mon Mar 19, 2012 5:04 am

check_db2_health

Post by qytmnet »

I have great difficulties to get this plugin work on the nagios image I download from , it requires to have perl DDB::DB2 module.

I downloaded from CPAN website http://httpupdate37.cpanel.net/CPAN/aut ... .83.tar.gz, but when I run make, I have

Constatns.xs:16:20 error: sqlcli.h: No such file or directory
Constatns.xs:18:21 error: sqlcli1.h: No such file or directory

Any ideas?

Thanks
Yan
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: check_db2_health

Post by nscott »

You typically have to install the client libraries for DB2 on the actual Nagios instance. Not the DB2 database itself, just the client libraries. When you install these it will also probably set some of the environment variables in your Linux environment. These would be a good start to try:

http://www.ibm.com/services/forms/preLo ... wg-idsoc97
Nicholas Scott
Former Nagios employee
qytmnet
Posts: 4
Joined: Mon Mar 19, 2012 5:04 am

Re: check_db2_health

Post by qytmnet »

Many thanks for your reply, Nicholas.

I have managed to download the library and installed DBD::DB2 and plugin check_db2_health works on my nagios server.

When I run command on Nagios server, it works.

But when I add services to Nagios interface, I have

CRITICAL - cannot connect to wcsts03. install_driver(DB2) failed: Can't load '/usr/local/lib/perl5/auto/DBD/DB2/DB2.so' for module DBD::DB2: libdb2.so.1: cannot open shared object file: No such file or directory at /usr/lib/perl5/DynaLoader.pm line 200.

I guess it has something to do with my command "$USER1$/check_db2_health --hostname ......". I checked /usr/local/nagios/etc/resource.cfg, I have $USER1$ set to /usr/local/nagios/libexec.

Any ideas what do I need to do please? Thanks
qytmnet
Posts: 4
Joined: Mon Mar 19, 2012 5:04 am

Re: check_db2_health

Post by qytmnet »

I have tried to setenv in httpd.conf to make sure LD_LIBRARY_PATH, and it still doesn't work.

Any help would be much appreciated. Thanks.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_db2_health

Post by scottwilkerson »

qytmnet wrote:I have tried to setenv in httpd.conf to make sure LD_LIBRARY_PATH, and it still doesn't work.

Any help would be much appreciated. Thanks.
You will likely need to do this in the script itself. Nagios doesn't run the check commands from apache, so setting it in httpd.conf will not help.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked