NagiosXI install_driver(DB2) failed
Posted: Tue Dec 09, 2014 6:08 am
I have install the check_db2_health from the site http://labs.consol.de/lang/en/nagios/check_db2_health/
For that, I first install the dsdriver (v9.5)
then Perl-Module DBD::DBI (v1.632) installation via perl -MCPAN -e 'install DBI'
and finally PERL DBD::DB2 (v1.85) manual installation (Download the latest DBD::DB2 driver source from http://search.cpan.org/~ibmtordb2/)
I have installed that on the nagios xi server
On this server, the command line works fine :
as root or as the user "nagios" :
/usr/local/nagios/libexec/check_db2_health --hostname X.X.X.X --port XXXXX --username XXXXX --password XXXXXX --mode last-backup --database XXXXXX
CRITICAL - last backup of db XXXXXX was 8.90 days ago | last_backup=8.90;1;2
But, when this action is launch by NagiosXI, the result is :
install_driver(DB2) failed: Can't load '/usr/local/lib64/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/lib64/perl5/DynaLoader.pm line 200.
at (eval 4) line 3
Compilation failed in require at (eval 4) line 3.
Perhaps a required shared library or dll isn't installed where expected
at /usr/local/nagios/libexec/check_db2_conexao.pl line 32
The files "/usr/local/lib64/perl5/auto/DBD/DB2/DB2.so" exists on nagios xi server
-r-xr-xr-x 1 root root 285594 Dec 8 01:43 /usr/local/lib64/perl5/auto/DBD/DB2/DB2.so
If you want to test better i sent a script to test connection on DB2 via perl.
Env:
Linux CentOS 6.6 - 64bits
Nagios XI Manual Installation.
For that, I first install the dsdriver (v9.5)
then Perl-Module DBD::DBI (v1.632) installation via perl -MCPAN -e 'install DBI'
and finally PERL DBD::DB2 (v1.85) manual installation (Download the latest DBD::DB2 driver source from http://search.cpan.org/~ibmtordb2/)
I have installed that on the nagios xi server
On this server, the command line works fine :
as root or as the user "nagios" :
/usr/local/nagios/libexec/check_db2_health --hostname X.X.X.X --port XXXXX --username XXXXX --password XXXXXX --mode last-backup --database XXXXXX
CRITICAL - last backup of db XXXXXX was 8.90 days ago | last_backup=8.90;1;2
But, when this action is launch by NagiosXI, the result is :
install_driver(DB2) failed: Can't load '/usr/local/lib64/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/lib64/perl5/DynaLoader.pm line 200.
at (eval 4) line 3
Compilation failed in require at (eval 4) line 3.
Perhaps a required shared library or dll isn't installed where expected
at /usr/local/nagios/libexec/check_db2_conexao.pl line 32
The files "/usr/local/lib64/perl5/auto/DBD/DB2/DB2.so" exists on nagios xi server
-r-xr-xr-x 1 root root 285594 Dec 8 01:43 /usr/local/lib64/perl5/auto/DBD/DB2/DB2.so
If you want to test better i sent a script to test connection on DB2 via perl.
Env:
Linux CentOS 6.6 - 64bits
Nagios XI Manual Installation.