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
check_db2_health
Re: check_db2_health
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
http://www.ibm.com/services/forms/preLo ... wg-idsoc97
Nicholas Scott
Former Nagios employee
Former Nagios employee
Re: check_db2_health
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
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
Re: check_db2_health
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.
Any help would be much appreciated. Thanks.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_db2_health
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.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.