Code: Select all
[nagios@nagios root]$ /usr/local/nagios/libexec/check_db2_health --hostname 192.168.2.10 --port 35001 --username=nagios --password=nagios --mode=connection-time --database=testdb
CRITICAL - cannot connect to 192.168.2.10. Total Environment allocation failure! Did you set up your DB2 client environment?The IBM documentation (https://www.ibm.com/support/knowledgece ... lient.html) says:
For the DB2 client, you must set the environment variables.
For Linux systems, add the environment variables to the bash_profile file of the user.
Set the following environment variables.
DB2DIR= /opt/ibm/db2/V10.5 (Default DB2 directory)
DB2INSTANCE=db2inst1 (default)
INSTHOME=/home/db2inst1
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INSTHOME/sqllib/lib
NLS_LANG
But after installing the client, I don't see a sqllib directory anywhere. I am also not sure which DB2 client package I have to install on the Nagios server and I have tried all the below.
I am confused with the multiple options listed here: http://www.db2dean.com/Previous/DB2Client.html
Which one of these do I need?
IBM Data Server Driver Package (DS Driver)
IBM Data Server Runtime Client
IBM Data Server Client
I believe that I have installed the Perl DBD::DB2 module correctly, or the error when I run the plugin would be different.
This is my first time trying to configure Nagios to monitor DB2 so any suggestions would be appreciated.