Page 1 of 1

Error plugin check_db2_health

Posted: Wed Nov 04, 2015 6:06 pm
by quental
HI,

we are triing to execute plugin check_db2_health.

when i execute this plugin, there is a problem:

./check_db2_health --hostname 192.168.4.220 --username db2 --password 12345 --database CRISTAL --mode connection-time
CRITICAL - cannot connect to 192.168.4.220. install_driver(DB2) failed: Can't locate DBD/DB2.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 (eval 17) line 3.
Perhaps the DBD::DB2 perl module hasn't been fully installed,
or perhaps the capitalisation of 'DB2' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge, mysql.
at ./check_db2_health line 2623

i try to do the installation of perl module DBD::DB2, but there is an error doing this:

DBD-DB2-1.85/tests/perld017_disconWithAutocomOFFRollback.pl
DBD-DB2-1.85/MANIFEST
CPAN: File::Temp loaded ok (v0.22)

CPAN.pm: Going to build I/IB/IBMTORDB2/DBD-DB2-1.85.tar.gz


Configuring DBD::DB2...
Remember to actually read the README and CAVEATS files!

DB2_HOME environment variable must be set to installed location of DB2.
Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site]
IBMTORDB2/DBD-DB2-1.85.tar.gz
/usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
Failed during this command:
IBMTORDB2/DBD-DB2-1.85.tar.gz : writemakefile NO '/usr/bin/perl Makefile.PL INSTALLDIRS=site' returned status 512


How can i solved it?
any sugesstion?

thanks

Re: Error plugin check_db2_health

Posted: Wed Nov 04, 2015 8:31 pm
by Box293
Are you following any guides on installing the perl module DBD::DB2 ? Can you direct us to them please.

Also, where did you download the plugin from?

Re: Error plugin check_db2_health

Posted: Thu Nov 05, 2015 3:06 am
by quental
Hi,

I'm not following any guide...

I only try to install DBD::DB2 with cpan.

I execute:

Code: Select all

perl -MCPAN -e Shell
and then:

Code: Select all

 #> install DBD::DB2
and get the error:

Code: Select all

  IBMTORDB2/DBD-DB2-1.85.tar.gz
  /usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK
Running make test
  Make had some problems, won't test
Running make install
  Make had some problems, won't install
I think I something more to install, but i dont know what module ...

any suggestions?

thanks.

Re: Error plugin check_db2_health

Posted: Thu Nov 05, 2015 2:24 pm
by tgriep
Try installing the perl modules using the command below and post back any errors.

Code: Select all

perl -MCPAN -e 'install Bundle::DBD::DB2'
Also, take a look at this link for that plugin for more information.
https://labs.consol.de/nagios/check_db2_health/