First, thanks for writing this plugin. So far it seems very nice.
My nagios server is a linux box that I have a DB2instance installed on.
This is where check_db2_health is installed.
I am able to monitor the instance on this Linux box with check_db2_health with no issues.
Now my issue. I have a DB2 database(10.5) running on Windows 2008 R2.
I am trying to run the database-usage health check against the DB2 installed on the Windows server.
I get this:
nc9053113186:/usr/local/nagios/libexec # ./check_db2_health --hostname cognoslss --port 50000 --username Administrator --password XXXXX --database cognoscs -mode database-usage
CRITICAL - unable to aquire database info
I am able to connect to that database from the linux box using DB2 command line:
db2inst1@nc9053113186:/cognos/admin> db2 "catalog tcpip node cog remote cognoslss server 50000"
DB20000I The CATALOG TCPIP NODE command completed successfully.
DB21056W Directory changes may not be effective until the directory cache is
refreshed.
db2inst1@nc9053113186:/cognos/admin> db2 "catalog database cognoscs at node cog"
DB20000I The CATALOG DATABASE command completed successfully.
DB21056W Directory changes may not be effective until the directory cache is
refreshed.
db2inst1@nc9053113186:~/cognos/admin> db2 attach to cog user Administrator using XXXXXX
Instance Attachment Information
Instance server = DB2/NT64 10.5.0
Authorization ID = ADMINIST...
Local instance alias = COG
db2inst1@nc9053113186:~/cognos/admin> db2 connect to cognoscs user Administrator using Hlk78tyu
Database Connection Information
Database server = DB2/NT64 10.5.0
SQL authorization ID = ADMINIST...
Local database alias = COGNOSCS
db2inst1@nc9053113186:~/cognos/admin>
So it sems that user can connect successfully.
I did run all the commands to enable monitoring on the windows DB2 server and they worked except:
C:\cognosadmin>db2 grant select,update on table SYSTOOLS.STMG_DBSIZE_INFO to Adm
inistrator
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0204N "SYSTOOLS.STMG_DBSIZE_INFO" is an undefined name. SQLSTATE=42704
C:\cognosadmin>
Any idea what I am doing wrong here.
Thanks
Tom