Xymon Mailing List Archive search

dbcheck for RAC connections refused

13 messages in this thread

list Martin Flemming · Wed, 29 Jul 2009 21:29:21 +0200 (CEST) ·
Hi !

I want to use dbcheck.pl from

http://sourceforge.net/projects/hobbit-perl-cl/

.. but unfortunatley something is going wrong, i get only
"Connection Refused" Messages and no data  .. :-(

My config is below:

bb-hosts:

0.0.0.0 atlas_tag_db    # noconn dbcheck
0.0.0.0 atlast1         # noconn dbcheck
0.0.0.0 atlast2        # noconn dbcheck
0.0.0.0 atlast3        # noconn dbcheck
0.0.0.0 atlast4        # noconn dbcheck


dbcheck.ini:

oraclehome              = /opt/products/oracle-client/10.2g/
username                = XXXX
password                = XXXXXXXXXXXXXXXXXXXXXXX


[atlas_tag_db]
dbtype                  = Oracle
oraclerac               = yes
hostname                = lcg3d-a-v-4   # hostname of the rac instance n.2
sid                     = atlas_tag_db  # sid of the rac instance n.2
port                    = 1521          # port of listener on rac instance n.2
username                = XXXX
password                = XXXXXXXXXXXX

[atlast1]
dbtype                  = Oracle
hostname                = lcg3d-a-v-1   # hostname of the rac instance n.2
sid                     = atlast1       # sid of the rac instance n.2
port                    = 1521          # port of listener on rac instance n.2
username                = XXXX
password                = XXXXXXXXXXX

[atlast2]
dbtype                  = Oracle
hostname                = lcg3d-a-v-2   # hostname of the rac instance n.2
sid                     = atlast2       # sid of the rac instance n.2
port                    = 1521          # port of listener on rac instance n.2
username                = XXXXX
password                = XXXXXXXXXXXXXXX


[atlast3]
dbtype                  = Oracle
hostname                = lcg3d-a-v-3   # hostname of the rac instance n.2
sid                     = atlast3       # sid of the rac instance n.2
port                    = 1521          # port of listener on rac instance n.2
username                = XXXXXX
password                = XXXXXXXXXXXXXXXX

[atlast4]
dbtype                  = Oracle
hostname                = lcg3d-a-v-4   # hostname of the rac instance n.2
sid                     = atlast4       # sid of the rac instance n.2
port                    = 1521          # port of listener on rac instance n.2
username                = XXXXXXXX
password                = XXXXXXXXXXXXXXXXXXX


It's a RAC-Cluster with the instances on virtual-xen-maschines ...
The Xen-server for the virtual machines are running with oracle-(redhat)-enterprise-linux :

Enterprise Linux Enterprise Linux Server release 5.2 (Carthage)
Linux lcg3d-a-1.desy.de 2.6.18-92.el5xen #1 SMP Fri May 23 23:49:15 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux

.. don't know, if that a important point for my problem ...

The dbcheck-error-output is like

bin/bbcmd ext/dbcheck.pl fast -dd

2009-07-29 21:09:50 Using default environment file /usr/lib/hobbit/server/etc/hobbitserver.cfg

.
.
.
Wed Jul 29 21:09:50 2009:CALL : Hobbit_fd_lib::exec_local_cmd line 429
Wed Jul 29 21:09:50 2009:DEBUG:RESULT= 0, COMMAND= /usr/lib/hobbit/server/bin/bbhostgrep dbcheck ,VALUE=0.0.0.0 atlas_tag_db # dbcheck
  0.0.0.0 atlast1 # dbcheck
Wed Jul 29 21:09:50 2009:CALL : Hobbit_fd_lib::exec_local_cmd line 429
Wed Jul 29 21:09:50 2009:DEBUG:RESULT= 0, COMMAND= /usr/lib/hobbit/server/bin/bbhostgrep dbcheck ,VALUE=0.0.0.0 atlas_tag_db # dbcheck
  0.0.0.0 atlast1 # dbcheck

.
.
.
Wed Jul 29 21:09:50 2009:DEBUG: hostadress: atlast1
Wed Jul 29 21:09:50 2009:DEBUG: mode=1, tocheck=0, testmode=0 
data0=uptime, data1=status+60
Wed Jul 29 21:09:50 2009:CALL : Hobbit_fd_lib::check_test line 1048
Wed Jul 29 21:09:50 2009:DEBUG: mode=1, tocheck=0, testmode=0 
data0=DBCheck, data1=status+60
Wed Jul 29 21:09:50 2009:CALL : Hobbit_fd_lib::load_test_config line 1182
Wed Jul 29 21:09:50 2009:DEBUG: LINE=fulltest, EVENT=DBCheck, 
CHECK=status+60
Wed Jul 29 21:09:50 2009:CALL : Hobbit_fd_lib::check_test line 1048
Wed Jul 29 21:09:50 2009:DEBUG: mode=1, tocheck=0, testmode=0 
data0=ChkConn, data1=status+60
Wed Jul 29 21:09:50 2009:CALL : Hobbit_fd_lib::load_test_config line 1182
Wed Jul 29 21:09:50 2009:DEBUG: LINE=conn, EVENT=ChkConn, CHECK=status+60
Wed Jul 29 21:09:50 2009:CALL : Hobbit_fd_lib::check_test line 1048
Wed Jul 29 21:09:50 2009:DEBUG: mode=1, tocheck=1, testmode=0 data0=Audit, 
data1=notest
Wed Jul 29 21:09:50 2009:CALL : Hobbit_fd_lib::load_test_config line 1182
Wed Jul 29 21:09:50 2009:DEBUG: LINE=audit, EVENT=Audit, CHECK=notest
Wed Jul 29 21:09:50 2009:CALL : Hobbit_fd_lib::check_test line 1048
Wed Jul 29 21:09:50 2009:DEBUG: mode=1, tocheck=1, testmode=0 
data0=TblSpace, data1=notest
Wed Jul 29 21:09:50 2009:CALL : Hobbit_fd_lib::load_test_config line 1182
Wed Jul 29 21:09:50 2009:DEBUG: LINE=tablespace, EVENT=TblSpace, 
CHECK=notest
Wed Jul 29 21:09:50 2009:CALL : Hobbit_fd_lib::check_test line 1048
Wed Jul 29 21:09:50 2009:DEBUG: mode=1, tocheck=1, testmode=0 
data0=Extent, data1=notest
Wed Jul 29 21:09:50 2009:CALL : Hobbit_fd_lib::load_test_config line 1182
Wed Jul 29 21:09:50 2009:DEBUG: LINE=extent, EVENT=Extent, CHECK=notest
Wed Jul 29 21:09:50 2009:CALL : Hobbit_fd_lib::check_test line 1048
Wed Jul 29 21:09:50 2009:CALL : Hobbit_fd_lib::check_test line 276
Wed Jul 29 21:09:50 2009:DEBUG: mode=1, tocheck=0, testmode=0 
data0=uptime, data1=status+60
Wed Jul 29 21:09:50 2009:DEBUG: mode=1, tocheck=1, testmode=0 
data0=HitCache, data1=notest
Wed Jul 29 21:09:50 2009:CALL : Hobbit_fd_lib::load_test_config line 1182
Wed Jul 29 21:09:50 2009:DEBUG: LINE=hitcache, EVENT=HitCache, 
CHECK=notest
Wed Jul 29 21:09:50 2009:CALL : Hobbit_fd_lib::check_test line 1048


Wed Jul 29 21:09:50 2009:DEBUG: LINE=unumber, EVENT=unumber, CHECK=status+60
Wed Jul 29 21:09:50 2009:ERROR on atlast1: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-1   # hostname of the rac instance n.2;port=1521 
# port of listener on rac instance n.2;sid=atlast1       # sid of the rac instance n.2!
Wed Jul 29 21:09:50 2009:CALL : Hobbit_fd_lib::send_bb line 1109
Wed Jul 29 21:09:50 2009:DEBUG: TEST=conn, TYPE=status+60, EVENT=ChkConn, SENDTYPE=2, TESTLIVE=60, SUMREPTIME=0
Wed Jul 29 21:09:50 2009:CALL : Hobbit_fd_lib::send_bb line 1109
Wed Jul 29 21:09:50 2009:DEBUG: BBDISPLAY: 131.169.56.65, hostname: atlast1, type: status+60, event: ChkConn, time: 00:00:00, color=red
Wed Jul 29 21:09:50 2009:CALL : Hobbit_fd_lib::send_bb line 1109
Wed Jul 29 21:09:50 2009:DEBUG: COMPLETE MESSAGE:status+60 atlast1.CkConn red Wed Jul 29 21:09:50 2009 Timeout connecting to 
DBI:Oracle:host=lcg3d-a-v-1   # hostname of the rac instance n.2;port=1521  # port of listener on rac instance n.2;sid=atlast1       # sid of the rac 
instance n.2!

dbcheck.pl version 1.08 - column ChkConn lifetime 60, tested in ~ 00:00:00 (max 00:00:20)
Wed Jul 29 21:09:50 2009:CALL : Hobbit_fd_lib::send_bb line 339
Wed Jul 29 21:09:50 2009:DEBUG: TEST=unumber, TYPE=status+60, EVENT=unumber, SENDTYPE=2, TESTLIVE=60, SUMREPTIME=0
Wed Jul 29 21:09:50 2009:CALL : Hobbit_fd_lib::send_bb line 339
Wed Jul 29 21:09:50 2009:DEBUG: BBDISPLAY: 131.169.56.65, hostname: atlast1, type: status+60, event: unumber, time: 00:00:00, color=clear
Wed Jul 29 21:09:50 2009:CALL : Hobbit_fd_lib::send_bb line 339
Wed Jul 29 21:09:50 2009:DEBUG: COMPLETE MESSAGE:status+60 atlast1.unumber clear Wed Jul 29 21:09:50 2009 Connection Check Failed
dbcheck.pl version 1.08 - column unumber lifetime 60, tested in ~ 00:00:00 (max 00:00:20)
Wed Jul 29 21:09:50 2009:ERROR on atlas_tag_db: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-4   # hostname of the rac instance n.2;port=1521 
# port of listener on rac instance n.2;sid=atlas_tag_db  # sid of the rac instance n.2!
Wed Jul 29 21:09:50 2009:CALL : Hobbit_fd_lib::send_bb line 1109
Wed Jul 29 21:09:50 2009:DEBUG: TEST=conn, TYPE=status+60, EVENT=ChkConn, SENDTYPE=2, TESTLIVE=60, SUMREPTIME=0
Wed Jul 29 21:09:50 2009:CALL : Hobbit_fd_lib::send_bb line 1109
Wed Jul 29 21:09:50 2009:DEBUG: BBDISPLAY: 131.169.56.65, hostname: atlas_tag_db, type: status+60, event: ChkConn, time: 00:00:00, color=red
Wed Jul 29 21:09:50 2009:CALL : Hobbit_fd_lib::send_bb line 1109
Wed Jul 29 21:09:50 2009:DEBUG: COMPLETE MESSAGE:status+60 atlas_tag_db.ChkConn red Wed Jul 29 21:09:50 2009 Timeout connecting to 
DBI:Oracle:host=lcg3d-a-v-4   # hostname of the rac instance n.2;port=1521          # port of listener on rac instance n.2;sid=atlas_tag_db  # sid of the rac 
instance n.2!


And status-page looks like

Test Time    = 00:00:01
Host Checked = 5
Status Msg   = 60

Colors                   Colors
clear                       55
red                          5

Events                   Events
Audit                        5
ChkConn                      5
Extent                       5
HitCache                     5
InvObj                       5
Locks                        5
MemReq                       5
RollBack                     5
Session                      5
TblSpace                     5
unumber                      5
uptime                       5

Types                     Types
status+60                   60

Hosts Summary
Hosts                     clear        red     Number      Times
atlas_tag_db                 11          1         12   00:00:00
atlast1                      11          1         12   00:00:00
atlast2                      11          1         12   00:00:00
atlast3                      11          1         12   00:00:00
atlast4                      11          1         12   00:00:00

Hosts Summary
Hosts                     Audit    ChkConn     Extent   HitCache     InvObj      Locks     MemReq   RollBack    Session   TblSpace    unumber     uptime
atlas_tag_db  1          1          1          1          1          1          1          1          1          1          1          1
atlast1                       1          1          1          1          1          1          1          1          1          1          1          1
atlast2                       1          1          1          1          1          1          1          1          1          1          1          1
atlast3                       1          1          1          1          1          1          1          1          1          1          1          1
atlast4                       1          1          1          1          1          1          1          1          1          1          1          1

Errors
No General Errors
atlas_tag_db
Wed Jul 29 18:52:47 2009:ERROR: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-4   # hostname of the rac instance n.2;port=1521 
# port of listener on rac instance n.2;sid=atlas_tag_db  # sid of the rac instance n.2!
atlast1
Wed Jul 29 18:52:47 2009:ERROR: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-1   # hostname of the rac instance n.2;port=1521 
# port of listener on rac instance n.2;sid=atlast1       # sid of the rac instance n.2!
atlast2
Wed Jul 29 18:52:47 2009:ERROR: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-2   # hostname of the rac instance n.2;port=1521 
# port of listener on rac instance n.2;sid=atlast2       # sid of the rac instance n.2!
atlast3
Wed Jul 29 18:52:47 2009:ERROR: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-3   # hostname of the rac instance n.2;port=1521 
# port of listener on rac instance n.2;sid=atlast3       # sid of the rac instance n.2!
atlast4
Wed Jul 29 18:52:47 2009:ERROR: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-4   # hostname of the rac instance n.2;port=1521 
# port of listener on rac instance n.2;sid=atlast4       # sid of the rac instance n.2!

Warnings
No General Warnings
No Hosts Warnings


dbcheck.pl version 1.08 - column dbcheck lifetime 60, tested in ~ 00:00:01 (max 00:02:00)

I use the old and also the new version of dbcheck.pl ...

Any idea why could my enviroment be damaged ?

thanks & cheers

 	martin
list Xymon User in Richmond · Wed, 29 Jul 2009 18:40:09 -0400 ·
quoted from Martin Flemming
On Wed, July 29, 2009 15:29, user-f286aaa49a76@xymon.invalid wrote:
Hi !

I want to use dbcheck.pl from

http://sourceforge.net/projects/hobbit-perl-cl/

.. but unfortunatley something is going wrong, i get only
"Connection Refused" Messages and no data  .. :-(

My config is below:
[SNIP]
dbcheck.ini:

oraclehome              = /opt/products/oracle-client/10.2g/
username                = XXXX
password                = XXXXXXXXXXXXXXXXXXXXXXX


[atlas_tag_db]
dbtype                  = Oracle
oraclerac               = yes
hostname                = lcg3d-a-v-4   # hostname of the rac instance n.2
sid                     = atlas_tag_db  # sid of the rac instance n.2
port                    = 1521          # port of listener on rac instance
n.2
username                = XXXX
password                = XXXXXXXXXXXX

[atlast1]
dbtype                  = Oracle
hostname                = lcg3d-a-v-1   # hostname of the rac instance n.2
sid                     = atlast1       # sid of the rac instance n.2
port                    = 1521          # port of listener on rac instance
n.2
username                = XXXX
password                = XXXXXXXXXXX

[atlast2]
dbtype                  = Oracle
hostname                = lcg3d-a-v-2   # hostname of the rac instance n.2
sid                     = atlast2       # sid of the rac instance n.2
port                    = 1521          # port of listener on rac instance
n.2
username                = XXXXX
password                = XXXXXXXXXXXXXXX


[atlast3]
dbtype                  = Oracle
hostname                = lcg3d-a-v-3   # hostname of the rac instance n.2
sid                     = atlast3       # sid of the rac instance n.2
port                    = 1521          # port of listener on rac instance
n.2
username                = XXXXXX
password                = XXXXXXXXXXXXXXXX

[atlast4]
dbtype                  = Oracle
hostname                = lcg3d-a-v-4   # hostname of the rac instance n.2
sid                     = atlast4       # sid of the rac instance n.2
port                    = 1521          # port of listener on rac instance
n.2
username                = XXXXXXXX
password                = XXXXXXXXXXXXXXXXXXX
[SNIP]
Errors
No General Errors
atlas_tag_db
Wed Jul 29 18:52:47 2009:ERROR: Timeout connecting to
DBI:Oracle:host=lcg3d-a-v-4   # hostname of the rac instance n.2;port=1521
# port of listener on rac instance n.2;sid=atlas_tag_db  # sid of the rac
instance n.2!
atlast1
Wed Jul 29 18:52:47 2009:ERROR: Timeout connecting to
DBI:Oracle:host=lcg3d-a-v-1   # hostname of the rac instance n.2;port=1521
# port of listener on rac instance n.2;sid=atlast1       # sid of the rac
instance n.2!
atlast2
Wed Jul 29 18:52:47 2009:ERROR: Timeout connecting to
DBI:Oracle:host=lcg3d-a-v-2   # hostname of the rac instance n.2;port=1521
# port of listener on rac instance n.2;sid=atlast2       # sid of the rac
instance n.2!
atlast3
Wed Jul 29 18:52:47 2009:ERROR: Timeout connecting to
DBI:Oracle:host=lcg3d-a-v-3   # hostname of the rac instance n.2;port=1521
# port of listener on rac instance n.2;sid=atlast3       # sid of the rac
instance n.2!
atlast4
Wed Jul 29 18:52:47 2009:ERROR: Timeout connecting to
DBI:Oracle:host=lcg3d-a-v-4   # hostname of the rac instance n.2;port=1521
# port of listener on rac instance n.2;sid=atlast4       # sid of the rac
instance n.2!

Warnings
No General Warnings
No Hosts Warnings


dbcheck.pl version 1.08 - column dbcheck lifetime 60, tested in ~ 00:00:01
(max 00:02:00)

I use the old and also the new version of dbcheck.pl ...

Any idea why could my enviroment be damaged ?
I don't use this code, but your error output suggests that it's trying to
use your hostname, sid, and port from dbcheck.ini exactly as written,
comments and all.  I don't see anything in the sample dbcheck.ini file
that suggests that you can use trailing comments in the way that you are
doing, so perhaps you should try without those.
list Francesco Duranti · Thu, 30 Jul 2009 01:24:42 +0200 ·
Hi, 
dbcheck.pl (and the other scripts in the package) use the CONFIG::IniFiles to read configuration data. CONFIG::Inifiles allow comment line starting with "#" and ";" but I think it will not recognize the "#" comment at the middle of a line so if you need comments you should put them alone on the line before or next to the line to comment on.

On some of the sample config file I've put some comment next to parameters and this could probably generate confusion. I'll change the sample config file and put this behavious also in the documentation I'm writing for the next version (the actual documentation is not really well written and organized).


Francesco
quoted from Xymon User in Richmond


On Wed, July 29, 2009 15:29, user-f286aaa49a76@xymon.invalid wrote:
Hi !

I want to use dbcheck.pl from

http://sourceforge.net/projects/hobbit-perl-cl/

.. but unfortunatley something is going wrong, i get only
"Connection Refused" Messages and no data  .. :-(

My config is below:
[SNIP]
dbcheck.ini:

oraclehome              = /opt/products/oracle-client/10.2g/
username                = XXXX
password                = XXXXXXXXXXXXXXXXXXXXXXX


[atlas_tag_db]
dbtype                  = Oracle
oraclerac               = yes
hostname                = lcg3d-a-v-4   # hostname of the rac instance n.2
sid                     = atlas_tag_db  # sid of the rac instance n.2
port                    = 1521          # port of listener on rac instance

I don't use this code, but your error output suggests that it's trying to
use your hostname, sid, and port from dbcheck.ini exactly as written,
comments and all.  I don't see anything in the sample dbcheck.ini file
that suggests that you can use trailing comments in the way that you are
doing, so perhaps you should try without those.
list Martin Flemming · Thu, 30 Jul 2009 11:47:25 +0200 (CEST) ·
Hi, Franceso !

Thanks for the hint, it looks better/cleaner now, but the error is still exist ...

"
/usr/lib/hobbit/server #  bin/bbcmd ext/dbcheck.pl -t atlast1
2009-07-30 08:08:28 Using default environment file /usr/lib/hobbit/server/etc/hobbitserver.cfg
Thu Jul 30 08:08:29 2009:ERROR on atlast1: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !
"


[it-wgs02] /usr/lib/hobbit/server #  bin/bbcmd perl -d  ext/dbcheck.pl -t atlast1
2009-07-30 08:05:59 Using default environment file /usr/lib/hobbit/server/etc/hobbitserver.cfg

Loading DB routines from perl5db.pl version 1.27
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1222):1222:           &load_config ;  DB<1> n
Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1223):1223:           &get_disabled_hosts;  DB<1> n
Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1224):1224:           my $pv=sprintf "%vd", $^V;  DB<1> n
Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1225):1225:           my $sv=$Sys::SigAction::VERSION;  DB<1> n
Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1226):1226:           if (($pv =~ /5\.8\.0/) && ($sv !~ /0\.09/)) {  DB<1> n
main::(ext/dbcheck.pl:39):      my ($orahome, @listahost, $dbhost, $port, $username, $password, $dbtype, $sid,$onlycustomcheck);  DB<1> n
main::(ext/dbcheck.pl:40):      my (%warnhash,%alerthash,$invobjignore,$invobjwarn, at invobjwlist, at invobjilist,$checkuserlist,%customcheck);  DB<1> n
main::(ext/dbcheck.pl:41):      my ($sendtv,$singlesendas,%selcmd,$raccheck, @KeyToCheck, at CustomKeyToCheck);  DB<1> n
main::(ext/dbcheck.pl:43):      my %DBCHECK = (main::(ext/dbcheck.pl:44):                     oracle           => [ "fulltest","conn","audit","tablespace","extent","hitcache","memreq",
main::(ext/dbcheck.pl:45):                                           "rollback","invobj","locks","session" ],
main::(ext/dbcheck.pl:46):                     oracledef        => [ "Database","ChkConn::fast","Audit::fast","TblSpace::fast","Extent::slow",
main::(ext/dbcheck.pl:47):                                           "HitCache::fast","MemReq::fast", "RollBack::slow","InvObj::fast",
main::(ext/dbcheck.pl:48):                                           "Locks::fast","Session::fast" ],
main::(ext/dbcheck.pl:49):                     informix         => [ "fulltest","conn","tablespace" ],
main::(ext/dbcheck.pl:50):                     informixdef      => [ "Database","ChkConn::fast","TblSpace::fast" ],
main::(ext/dbcheck.pl:51):                     sqlserver        => [ "fulltest","conn","tablespace" ],
main::(ext/dbcheck.pl:52):                     sqlserverdef     => [ "Database","ChkConn::fast","TblSpace::fast" ],
main::(ext/dbcheck.pl:53):                     mysql            => [ "fulltest","conn","mysqlperf" ],
main::(ext/dbcheck.pl:54):                     mysqldef         => [ "MySQL","ChkConn::fast","mysqlperf::fast" ],
main::(ext/dbcheck.pl:55):                     db2              => [ "fulltest","conn","tablespace" ],
main::(ext/dbcheck.pl:56):                     db2def           => [ "DB2","ChkConn::fast","TblSpace::fast" ],
main::(ext/dbcheck.pl:57):                   );  DB<1> n
main::(ext/dbcheck.pl:59):      my $CHECKLIST = [ "pinlib:95:90", "blbuff:95:90", "rowcache:95:90", "tblsp:90:95", "hitcache:95:90", "rollback:90:95",
main::(ext/dbcheck.pl:60):                                      "session:90:95", "process:90:95", "memreq:90:95", "extent:90:95" ];  DB<1> n
main::(ext/dbcheck.pl:63):              @listahost=&Hobbit_fd_lib::get_server_to_test($TEST) if (!@listahost);  DB<1> n
main::(ext/dbcheck.pl:64):              &Hobbit_fd_lib::execute_thread(\&execute_db_test , at listahost);  DB<1> n
Thu Jul 30 08:06:27 2009:ERROR on atlast1: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !

Debugged program terminated.  Use q to quit or R to restart,
   use O inhibit_exit to avoid stopping after program termination,
   h q, h R or h O to get additional info.
main::(ext/dbcheck.pl:65):              exit;
   DB<1>

... and the logfile e.g.

Thu Jul 30 11:45:37 2009:ERROR on atlas_tag_db: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-4   ;port=1521         ;sid=atlas_tag_db  !
Thu Jul 30 11:45:37 2009:ERROR on atlast1: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !
Thu Jul 30 11:45:37 2009:ERROR on atlast3: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-3  ;port=1521          ;sid=atlast3       !
Thu Jul 30 11:45:37 2009:ERROR on atlast2: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-2   ;port=1521          ;sid=atlast2       !
Thu Jul 30 11:45:37 2009:ERROR on atlast4: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-4  ;port=1521         ;sid=atlast4   !


Any suggestions for further debugging ?

thanks & cheers

 	martin
quoted from Francesco Duranti


On Thu, 30 Jul 2009, Francesco Duranti wrote:
Hi,
dbcheck.pl (and the other scripts in the package) use the CONFIG::IniFiles to read configuration data. CONFIG::Inifiles allow comment line starting with "#" and ";" but I think it will not recognize the "#" comment at the middle of a line so if you need comments you should put them alone on the line before or next to the line to comment on.

On some of the sample config file I've put some comment next to parameters and this could probably generate confusion. I'll change the sample config file and put this behavious also in the documentation I'm writing for the next version (the actual documentation is not really well written and organized).


Francesco


On Wed, July 29, 2009 15:29, user-f286aaa49a76@xymon.invalid wrote:
Hi !

I want to use dbcheck.pl from

http://sourceforge.net/projects/hobbit-perl-cl/

.. but unfortunatley something is going wrong, i get only
"Connection Refused" Messages and no data  .. :-(

My config is below:
[SNIP]
dbcheck.ini:

oraclehome              = /opt/products/oracle-client/10.2g/
username                = XXXX
password                = XXXXXXXXXXXXXXXXXXXXXXX


[atlas_tag_db]
dbtype                  = Oracle
oraclerac               = yes
hostname                = lcg3d-a-v-4   # hostname of the rac instance n.2
sid                     = atlas_tag_db  # sid of the rac instance n.2
port                    = 1521          # port of listener on rac instance

I don't use this code, but your error output suggests that it's trying to
use your hostname, sid, and port from dbcheck.ini exactly as written,
comments and all.  I don't see anything in the sample dbcheck.ini file
that suggests that you can use trailing comments in the way that you are
doing, so perhaps you should try without those.

list Francesco Duranti · Thu, 30 Jul 2009 14:15:24 +0200 ·
This is what i normally do to check a RAC DB + single RAC instance in the configuration:

oraclehome              = /usr/local/oracle/10.2.0/client/
bbdisplay               = localhost
bbconncolumn            = ChkConn::fast
bbauditcolumn           = Audit::fast
bbtablespacecolumn      = TblSpace::fast
bbextentcolumn          = Extent::slow
bbhitcachecolumn        = HitCache::fast
bbmemreqcolumn          = MemReq::fast
bbrollbackcolumn        = RollBack::slow
bbinvobjcolumn          = InvObj::fast
bblockscolumn           = Locks::fast
bbsessioncolumn         = Session::fast
bbsessionuserlist       = yes
username                = userxxx
password                = pwxxxxx

[CL10G]
oraclerac               = yes
bbhitcachecolumn        = HitCache:notest
bbmemreqcolumn          = MemReq:notest

[CL10G1]
hostname                = itromdb21
bbauditcolumn           = Audit:notest
bbtablespacecolumn      = TblSpace:notest
bbextentcolumn          = Extent:notest
bbrollbackcolumn        = RollBack:notest
bblockscolumn           = Locks:notest
bbinvobjcolumn          = InvObj:notest

[CL10G2]
hostname                = itromdb22
bbauditcolumn           = Audit:notest
bbtablespacecolumn      = TblSpace:notest
bbextentcolumn          = Extent:notest
bbrollbackcolumn        = RollBack:notest
bblockscolumn           = Locks:notest
bbinvobjcolumn          = InvObj:notest


In tnsnames.ora (under ORACLE_HOME/network/admin) I've those configuration:

CL10G =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB21)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB22)(PORT = 1521))
    (LOAD_BALANCE = no)
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = cl10g)
    )
  )

CL10G2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB22)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = cl10g)
      (INSTANCE_NAME = cl10g2)
    )
  )

CL10G1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB21)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = cl10g)
      (INSTANCE_NAME = cl10g1)
    )
  )


With this setting I normally use the tnsnames.ora configuration for RAC (I was able to check RAC database only using tnsnames.ora not directly. 
You  can try to remove the hostname and port from the db configuration for the RAC. 
If the SID is equal to the name of the DB to check (the one in []) you can also remove the sid line from the configuration.

You can also try to connect with a telnet to the hostname and listener port to see if it answer (or better you can configure on the client the tnsnames.ora and do a tnsping to see if the instances are answering).

As you can see I don't do some checks on the RAC itselft or on the single instances... For example I don't test memreq and hitcache on the RAC and I don't check TblSpace, Extent, Rollback, locks, invalid objects on the single instances.


Please check also on the configuration file and remove all ending space after host or port or sid. I don't know if it can create problems (I'll check this also and remove those from the configuration option for the next version).


Let me know if this work for you or you have other problems.

Francesco
quoted from Martin Flemming


-----Original Message-----
From: Martin Flemming [mailto:user-f286aaa49a76@xymon.invalid] 
Sent: giovedì 30 luglio 2009 11.47
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] dbcheck for RAC connections refused


Hi, Franceso !

Thanks for the hint, it looks better/cleaner now, but the error is still exist ...

"
/usr/lib/hobbit/server #  bin/bbcmd ext/dbcheck.pl -t atlast1
2009-07-30 08:08:28 Using default environment file /usr/lib/hobbit/server/etc/hobbitserver.cfg
Thu Jul 30 08:08:29 2009:ERROR on atlast1: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !
"


[it-wgs02] /usr/lib/hobbit/server #  bin/bbcmd perl -d  ext/dbcheck.pl -t atlast1
2009-07-30 08:05:59 Using default environment file /usr/lib/hobbit/server/etc/hobbitserver.cfg

Loading DB routines from perl5db.pl version 1.27
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1222):1222:           &load_config ;  DB<1> n
Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1223):1223:           &get_disabled_hosts;  DB<1> n
Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1224):1224:           my $pv=sprintf "%vd", $^V;  DB<1> n
Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1225):1225:           my $sv=$Sys::SigAction::VERSION;  DB<1> n
Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1226):1226:           if (($pv =~ /5\.8\.0/) && ($sv !~ /0\.09/)) {  DB<1> n
main::(ext/dbcheck.pl:39):      my ($orahome, @listahost, $dbhost, $port, $username, $password, $dbtype, $sid,$onlycustomcheck);  DB<1> n
main::(ext/dbcheck.pl:40):      my (%warnhash,%alerthash,$invobjignore,$invobjwarn, at invobjwlist, at invobjilist,$checkuserlist,%customcheck);  DB<1> n
main::(ext/dbcheck.pl:41):      my ($sendtv,$singlesendas,%selcmd,$raccheck, @KeyToCheck, at CustomKeyToCheck);  DB<1> n
main::(ext/dbcheck.pl:43):      my %DBCHECK = (main::(ext/dbcheck.pl:44):                     oracle           => [ "fulltest","conn","audit","tablespace","extent","hitcache","memreq",
main::(ext/dbcheck.pl:45):                                           "rollback","invobj","locks","session" ],
main::(ext/dbcheck.pl:46):                     oracledef        => [ "Database","ChkConn::fast","Audit::fast","TblSpace::fast","Extent::slow",
main::(ext/dbcheck.pl:47):                                           "HitCache::fast","MemReq::fast", "RollBack::slow","InvObj::fast",
main::(ext/dbcheck.pl:48):                                           "Locks::fast","Session::fast" ],
main::(ext/dbcheck.pl:49):                     informix         => [ "fulltest","conn","tablespace" ],
main::(ext/dbcheck.pl:50):                     informixdef      => [ "Database","ChkConn::fast","TblSpace::fast" ],
main::(ext/dbcheck.pl:51):                     sqlserver        => [ "fulltest","conn","tablespace" ],
main::(ext/dbcheck.pl:52):                     sqlserverdef     => [ "Database","ChkConn::fast","TblSpace::fast" ],
main::(ext/dbcheck.pl:53):                     mysql            => [ "fulltest","conn","mysqlperf" ],
main::(ext/dbcheck.pl:54):                     mysqldef         => [ "MySQL","ChkConn::fast","mysqlperf::fast" ],
main::(ext/dbcheck.pl:55):                     db2              => [ "fulltest","conn","tablespace" ],
main::(ext/dbcheck.pl:56):                     db2def           => [ "DB2","ChkConn::fast","TblSpace::fast" ],
main::(ext/dbcheck.pl:57):                   );  DB<1> n
main::(ext/dbcheck.pl:59):      my $CHECKLIST = [ "pinlib:95:90", "blbuff:95:90", "rowcache:95:90", "tblsp:90:95", "hitcache:95:90", "rollback:90:95",
main::(ext/dbcheck.pl:60):                                      "session:90:95", "process:90:95", "memreq:90:95", "extent:90:95" ];  DB<1> n
main::(ext/dbcheck.pl:63):              @listahost=&Hobbit_fd_lib::get_server_to_test($TEST) if (!@listahost);  DB<1> n
main::(ext/dbcheck.pl:64):              &Hobbit_fd_lib::execute_thread(\&execute_db_test , at listahost);  DB<1> n
Thu Jul 30 08:06:27 2009:ERROR on atlast1: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !

Debugged program terminated.  Use q to quit or R to restart,
   use O inhibit_exit to avoid stopping after program termination,
   h q, h R or h O to get additional info.
main::(ext/dbcheck.pl:65):              exit;
   DB<1>

... and the logfile e.g.

Thu Jul 30 11:45:37 2009:ERROR on atlas_tag_db: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-4   ;port=1521         ;sid=atlas_tag_db  !
Thu Jul 30 11:45:37 2009:ERROR on atlast1: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !
Thu Jul 30 11:45:37 2009:ERROR on atlast3: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-3  ;port=1521          ;sid=atlast3       !
Thu Jul 30 11:45:37 2009:ERROR on atlast2: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-2   ;port=1521          ;sid=atlast2       !
Thu Jul 30 11:45:37 2009:ERROR on atlast4: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-4  ;port=1521         ;sid=atlast4   !


Any suggestions for further debugging ?

thanks & cheers

 	martin


On Thu, 30 Jul 2009, Francesco Duranti wrote:
Hi,
dbcheck.pl (and the other scripts in the package) use the CONFIG::IniFiles to read configuration data. CONFIG::Inifiles allow comment line starting with "#" and ";" but I think it will not recognize the "#" comment at the middle of a line so if you need comments you should put them alone on the line before or next to the line to comment on.

On some of the sample config file I've put some comment next to parameters and this could probably generate confusion. I'll change the sample config file and put this behavious also in the documentation I'm writing for the next version (the actual documentation is not really well written and organized).


Francesco


On Wed, July 29, 2009 15:29, user-f286aaa49a76@xymon.invalid wrote:
Hi !

I want to use dbcheck.pl from

http://sourceforge.net/projects/hobbit-perl-cl/

.. but unfortunatley something is going wrong, i get only
"Connection Refused" Messages and no data  .. :-(

My config is below:
[SNIP]
dbcheck.ini:

oraclehome              = /opt/products/oracle-client/10.2g/
username                = XXXX
password                = XXXXXXXXXXXXXXXXXXXXXXX


[atlas_tag_db]
dbtype                  = Oracle
oraclerac               = yes
hostname                = lcg3d-a-v-4   # hostname of the rac instance n.2
sid                     = atlas_tag_db  # sid of the rac instance n.2
port                    = 1521          # port of listener on rac instance

I don't use this code, but your error output suggests that it's trying to
use your hostname, sid, and port from dbcheck.ini exactly as written,
comments and all.  I don't see anything in the sample dbcheck.ini file
that suggests that you can use trailing comments in the way that you are
doing, so perhaps you should try without those.

list Xymon User in Richmond · Thu, 30 Jul 2009 11:08:24 -0400 ·
Looks like you left trailing white space when you removed the dbcheck.ini
trailing comments.
list Martin Flemming · Fri, 31 Jul 2009 00:28:12 +0200 (CEST) ·
Hi !

Unfortunatley, i've got no luck till yet ...

I've cleaned up my dbcheck.ini like this, also without any spaces ...


# cat etc/dbcheck.ini|grep -v \#


[default]
warningout              = send
conn                    = conn
include                 =
defaultgroup            =
timeoutdbconn           = 20s
timeoudbtselect         = 1h
oraclehome              = /opt/products/oracle-client/10.2g/
fastcheck               = 30m
mediumcheck             = 2h
slowcheck               = 6h
bbdisplay               = localhost
bbsendtype              = multi
singlesendashost        = no
quoted from Francesco Duranti
bbconncolumn            = ChkConn::fast
bbauditcolumn           = Audit::fast
bbtablespacecolumn      = TblSpace::fast
bbextentcolumn          = Extent::slow
bbhitcachecolumn        = HitCache::fast
bbmemreqcolumn          = MemReq::fast
bbrollbackcolumn        = RollBack::slow
bbinvobjcolumn          = InvObj::fast
bblockscolumn           = Locks::fast
bbsessioncolumn         = Session::fast
bbsessionuserlist       = yes

username                = XXXXXXXXXX
password                = XXXXXXXXXXXXXXxx
tblspcheck              = 90:95
tblspreportautoext      = 90:95
pinlibcheck             = 95:90
blbuffcheck             = 95:90
hitcachecheck           = 95:90
rowcachecheck           = 95:90
extentcheck             = 90:95
rollbackcheck           = 90:95
sessioncheck            = 90:95
processcheck            = 90:95
rb.SYSTEM               = 101:101
invobjwarn              = :::
invobjignore            =
dbtype                  = Oracle


[atlast1]
hostname                = lcg3d-a-v-1
port                    = 1521
username                = XXXXXXXXXXX
password                = XXXXXXXXXXXXX
quoted from Francesco Duranti
bbauditcolumn           = Audit:notest
bbtablespacecolumn      = TblSpace:notest
bbextentcolumn          = Extent:notest
bbrollbackcolumn        = RollBack:notest
bblockscolumn           = Locks:notest
bbinvobjcolumn          = InvObj:notest


[atlast2]
hostname                = lcg3d-a-v-2
port                    = 1521
quoted from Francesco Duranti
bbauditcolumn             = Audit:notest
bbtablespacecolumn      = TblSpace:notest
bbextentcolumn          = Extent:notest
bbrollbackcolumn        = RollBack:notest
bblockscolumn           = Locks:notest
bbinvobjcolumn          = InvObj:notest

username                = XXXXXXXXXXx
password                = XXXXXXXXXXXXXX


[atlast3]
hostname                = lcg3d-a-v-3
port                    = 1521
quoted from Francesco Duranti
bbauditcolumn             = Audit:notest
bbtablespacecolumn      = TblSpace:notest
bbextentcolumn          = Extent:notest
bbrollbackcolumn        = RollBack:notest
bblockscolumn           = Locks:notest
bbinvobjcolumn          = InvObj:notest

username                = XXXXXX
password                = XXXXXXXXXX


[atlast4]
hostname                = lcg3d-a-v-4
port                    = 1521
username                = XXXXXXX
password                = XXXXXXXXXXX
quoted from Francesco Duranti
bbauditcolumn             = Audit:notest
bbtablespacecolumn      = TblSpace:notest
bbextentcolumn          = Extent:notest
bbrollbackcolumn        = RollBack:notest
bblockscolumn           = Locks:notest
bbinvobjcolumn          = InvObj:notest


[atlas_tag_db]
oraclerac               = yes
port                    = 1521
username                = XXXXXXXX
password                = XXXXXXXXX
bbhitcachecolumn        = HitCache:notest
bbmemreqcolumn          = MemReq:notest


The output of the test is :

l Stats
Test Time    = 00:00:01
Host Checked = 5
Status Msg   = 29

Colors                   Colors
clear                       24
red                          5

Events                   Events
Audit                        1
ChkConn                      5
Extent                       1
HitCache                     4
InvObj                       1
Locks                        1
MemReq                       4
RollBack                     1
Session                      5
TblSpace                     1
uptime                       5

Types                     Types
status+30m                  22
status+60                    5
status+6h                    2

Hosts Summary
Hosts                     clear        red     Number      Times
atlas_tag_db                  8          1          9   00:00:00
atlast1                       4          1          5   00:00:00
atlast2                       4          1          5   00:00:00
atlast3                       4          1          5   00:00:00
atlast4                       4          1          5   00:00:00

Hosts Summary
Hosts                     Audit    ChkConn     Extent   HitCache 
InvObj      Locks     MemReq   RollBack    Session   TblSpace     uptime
atlas_tag_db                  1          1          1          0 
1          1          0          1          1          1          1
atlast1                       0          1          0          1 
0          0          1          0          1          0          1
atlast2                       0          1          0          1 
0          0          1          0          1          0          1
atlast3                       0          1          0          1 
0          0          1          0          1          0          1
atlast4                       0          1          0          1 
0          0          1          0          1          0          1

Errors
No General Errors
atlas_tag_db
Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to DBI:Oracle:atlas_tag_db!
atlast1
Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-1;port=1521;sid=atlast1!
atlast2
Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-2;port=1521;sid=atlast2!
atlast3
Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-3;port=1521;sid=atlast3!
atlast4
Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-4;port=1521;sid=atlast4!

Warnings
No General Warnings

In tnsnames.ora (under ORACLE_HOME/network/admin) I've those configuration:
This is a good point, i can't use the tnsnames.ora, because my 
oracle-software is placed in the global filesystem AFS ...

So, could this be a problem, if i have to got all informations only from dbcheck.ini ?

You can also try to connect with a telnet to the hostname and listener port

Yep, telnet to port 1521 is working .. to  lcg3d-a-v-1/4

here my enviroment:

bin/bbcmd  ext/dbcheck.pl -v
2009-07-31 00:04:28 Using default environment file /usr/lib/hobbit/server/etc/hobbitserver.cfg
Program Information
         dbcheck.pl version 1.09
         Hobbit_fd_lib.pm version 1.16

OS Information
         Linux it-wgs02 2.6.9-78.0.22.ELsmp #1 SMP Thu Apr 30 23:30:54 CDT 
2009 i686 i686 i386 GNU/Linux
         Perl version is v5.8.5

Module Information
         FindBin 1.44
         POSIX 1.08
         Text::Wrap 2001.09292
         Time::Local 1.1
         Sys::SigAction 0.04
         Config::IniFiles 2.39
         DBI 1.605
         DBD::DBM 0.03
         DBD::ExampleP 12.010007
         DBD::File 0.35
         DBD::Gofer 0.011377
         DBD::Oracle 1.23
         DBD::Proxy 0.2004
         DBD::Sponge 12.010002


Hmm, misterious ..
quoted from Francesco Duranti

 	martin


On Thu, 30 Jul 2009, Francesco Duranti wrote:
This is what i normally do to check a RAC DB + single RAC instance in the configuration:

oraclehome              = /usr/local/oracle/10.2.0/client/
bbdisplay               = localhost
bbconncolumn            = ChkConn::fast
bbauditcolumn           = Audit::fast
bbtablespacecolumn      = TblSpace::fast
bbextentcolumn          = Extent::slow
bbhitcachecolumn        = HitCache::fast
bbmemreqcolumn          = MemReq::fast
bbrollbackcolumn        = RollBack::slow
bbinvobjcolumn          = InvObj::fast
bblockscolumn           = Locks::fast
bbsessioncolumn         = Session::fast
bbsessionuserlist       = yes
username                = userxxx
password                = pwxxxxx

[CL10G]
oraclerac               = yes
bbhitcachecolumn        = HitCache:notest
bbmemreqcolumn          = MemReq:notest

[CL10G1]
hostname                = itromdb21
bbauditcolumn           = Audit:notest
bbtablespacecolumn      = TblSpace:notest
bbextentcolumn          = Extent:notest
bbrollbackcolumn        = RollBack:notest
bblockscolumn           = Locks:notest
bbinvobjcolumn          = InvObj:notest

[CL10G2]
hostname                = itromdb22
bbauditcolumn           = Audit:notest
bbtablespacecolumn      = TblSpace:notest
bbextentcolumn          = Extent:notest
bbrollbackcolumn        = RollBack:notest
bblockscolumn           = Locks:notest
bbinvobjcolumn          = InvObj:notest


In tnsnames.ora (under ORACLE_HOME/network/admin) I've those configuration:

CL10G =
 (DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB21)(PORT = 1521))
   (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB22)(PORT = 1521))
   (LOAD_BALANCE = no)
   (CONNECT_DATA =
     (SERVER = DEDICATED)
     (SERVICE_NAME = cl10g)
   )
 )

CL10G2 =
 (DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB22)(PORT = 1521))
   (CONNECT_DATA =
     (SERVER = DEDICATED)
     (SERVICE_NAME = cl10g)
     (INSTANCE_NAME = cl10g2)
   )
 )

CL10G1 =
 (DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB21)(PORT = 1521))
   (CONNECT_DATA =
     (SERVER = DEDICATED)
     (SERVICE_NAME = cl10g)
     (INSTANCE_NAME = cl10g1)
   )
 )


With this setting I normally use the tnsnames.ora configuration for RAC (I was able to check RAC database only using tnsnames.ora not directly.
You  can try to remove the hostname and port from the db configuration for the RAC.
If the SID is equal to the name of the DB to check (the one in []) you can also remove the sid line from the configuration.

You can also try to connect with a telnet to the hostname and listener port to see if it answer (or better you can configure on the client the tnsnames.ora and do a tnsping to see if the instances are answering).

As you can see I don't do some checks on the RAC itselft or on the single instances... For example I don't test memreq and hitcache on the RAC and I don't check TblSpace, Extent, Rollback, locks, invalid objects on the single instances.


Please check also on the configuration file and remove all ending space after host or port or sid. I don't know if it can create problems (I'll check this also and remove those from the configuration option for the next version).


Let me know if this work for you or you have other problems.

Francesco


-----Original Message-----
From: Martin Flemming [mailto:user-f286aaa49a76@xymon.invalid]
Sent: giovedì 30 luglio 2009 11.47
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] dbcheck for RAC connections refused


Hi, Franceso !

Thanks for the hint, it looks better/cleaner now, but the error is still exist ...

"
/usr/lib/hobbit/server #  bin/bbcmd ext/dbcheck.pl -t atlast1
2009-07-30 08:08:28 Using default environment file /usr/lib/hobbit/server/etc/hobbitserver.cfg
Thu Jul 30 08:08:29 2009:ERROR on atlast1: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !
"


[it-wgs02] /usr/lib/hobbit/server #  bin/bbcmd perl -d  ext/dbcheck.pl -t atlast1
2009-07-30 08:05:59 Using default environment file /usr/lib/hobbit/server/etc/hobbitserver.cfg

Loading DB routines from perl5db.pl version 1.27
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1222):1222:           &load_config ;  DB<1> n
Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1223):1223:           &get_disabled_hosts;  DB<1> n
Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1224):1224:           my $pv=sprintf "%vd", $^V;  DB<1> n
Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1225):1225:           my $sv=$Sys::SigAction::VERSION;  DB<1> n
Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1226):1226:           if (($pv =~ /5\.8\.0/) && ($sv !~ /0\.09/)) {  DB<1> n
main::(ext/dbcheck.pl:39):      my ($orahome, @listahost, $dbhost, $port, $username, $password, $dbtype, $sid,$onlycustomcheck);  DB<1> n
main::(ext/dbcheck.pl:40):      my (%warnhash,%alerthash,$invobjignore,$invobjwarn, at invobjwlist, at invobjilist,$checkuserlist,%customcheck);  DB<1> n
main::(ext/dbcheck.pl:41):      my ($sendtv,$singlesendas,%selcmd,$raccheck, @KeyToCheck, at CustomKeyToCheck);  DB<1> n
main::(ext/dbcheck.pl:43):      my %DBCHECK = (main::(ext/dbcheck.pl:44):                     oracle           => [ "fulltest","conn","audit","tablespace","extent","hitcache","memreq",
main::(ext/dbcheck.pl:45):                                           "rollback","invobj","locks","session" ],
main::(ext/dbcheck.pl:46):                     oracledef        => [ "Database","ChkConn::fast","Audit::fast","TblSpace::fast","Extent::slow",
main::(ext/dbcheck.pl:47):                                           "HitCache::fast","MemReq::fast", "RollBack::slow","InvObj::fast",
main::(ext/dbcheck.pl:48):                                           "Locks::fast","Session::fast" ],
main::(ext/dbcheck.pl:49):                     informix         => [ "fulltest","conn","tablespace" ],
main::(ext/dbcheck.pl:50):                     informixdef      => [ "Database","ChkConn::fast","TblSpace::fast" ],
main::(ext/dbcheck.pl:51):                     sqlserver        => [ "fulltest","conn","tablespace" ],
main::(ext/dbcheck.pl:52):                     sqlserverdef     => [ "Database","ChkConn::fast","TblSpace::fast" ],
main::(ext/dbcheck.pl:53):                     mysql            => [ "fulltest","conn","mysqlperf" ],
main::(ext/dbcheck.pl:54):                     mysqldef         => [ "MySQL","ChkConn::fast","mysqlperf::fast" ],
main::(ext/dbcheck.pl:55):                     db2              => [ "fulltest","conn","tablespace" ],
main::(ext/dbcheck.pl:56):                     db2def           => [ "DB2","ChkConn::fast","TblSpace::fast" ],
main::(ext/dbcheck.pl:57):                   );  DB<1> n
main::(ext/dbcheck.pl:59):      my $CHECKLIST = [ "pinlib:95:90", "blbuff:95:90", "rowcache:95:90", "tblsp:90:95", "hitcache:95:90", "rollback:90:95",
main::(ext/dbcheck.pl:60):                                      "session:90:95", "process:90:95", "memreq:90:95", "extent:90:95" ];  DB<1> n
main::(ext/dbcheck.pl:63):              @listahost=&Hobbit_fd_lib::get_server_to_test($TEST) if (!@listahost);  DB<1> n
main::(ext/dbcheck.pl:64):              &Hobbit_fd_lib::execute_thread(\&execute_db_test , at listahost);  DB<1> n
Thu Jul 30 08:06:27 2009:ERROR on atlast1: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !

Debugged program terminated.  Use q to quit or R to restart,
  use O inhibit_exit to avoid stopping after program termination,
  h q, h R or h O to get additional info.
main::(ext/dbcheck.pl:65):              exit;
  DB<1>

... and the logfile e.g.

Thu Jul 30 11:45:37 2009:ERROR on atlas_tag_db: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-4   ;port=1521         ;sid=atlas_tag_db  !
Thu Jul 30 11:45:37 2009:ERROR on atlast1: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !
Thu Jul 30 11:45:37 2009:ERROR on atlast3: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-3  ;port=1521          ;sid=atlast3       !
Thu Jul 30 11:45:37 2009:ERROR on atlast2: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-2   ;port=1521          ;sid=atlast2       !
Thu Jul 30 11:45:37 2009:ERROR on atlast4: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-4  ;port=1521         ;sid=atlast4   !


Any suggestions for further debugging ?

thanks & cheers

	martin


On Thu, 30 Jul 2009, Francesco Duranti wrote:
Hi,
dbcheck.pl (and the other scripts in the package) use the CONFIG::IniFiles to read configuration data. CONFIG::Inifiles allow comment line starting with "#" and ";" but I think it will not recognize the "#" comment at the middle of a line so if you need comments you should put them alone on the line before or next to the line to comment on.

On some of the sample config file I've put some comment next to parameters and this could probably generate confusion. I'll change the sample config file and put this behavious also in the documentation I'm writing for the next version (the actual documentation is not really well written and organized).


Francesco


On Wed, July 29, 2009 15:29, user-f286aaa49a76@xymon.invalid wrote:
Hi !

I want to use dbcheck.pl from

http://sourceforge.net/projects/hobbit-perl-cl/

.. but unfortunatley something is going wrong, i get only
"Connection Refused" Messages and no data  .. :-(

My config is below:
[SNIP]
dbcheck.ini:

oraclehome              = /opt/products/oracle-client/10.2g/
username                = XXXX
password                = XXXXXXXXXXXXXXXXXXXXXXX


[atlas_tag_db]
dbtype                  = Oracle
oraclerac               = yes
hostname                = lcg3d-a-v-4   # hostname of the rac instance n.2
sid                     = atlas_tag_db  # sid of the rac instance n.2
port                    = 1521          # port of listener on rac instance

I don't use this code, but your error output suggests that it's trying to
use your hostname, sid, and port from dbcheck.ini exactly as written,
comments and all.  I don't see anything in the sample dbcheck.ini file
that suggests that you can use trailing comments in the way that you are
doing, so perhaps you should try without those.

list Francesco Duranti · Fri, 31 Jul 2009 12:55:24 +0200 ·
This is really strange.
Regarding the RAC test it cannot be done without the tnsnames.ora configuration.
What's the problem regarding the tnsnames.ora? does it exists?

The timeout problem seems also strange because it's like your client could not reach the database.
You should try to connect to the oracle client (sqlplus).

You can also try with this perl script

#/usr/bin/perl
use DBI;
$ENV{'ORACLE_HOME'}="/usr/local/oracle/10.2.0/client/";
$dbhost="hostname";
$port=1521;
$sid="SID";
$user="user";
$pw="password";
$data_source="DBI:Oracle:host=$dbhost;port=$port;sid=$sid";
$dbh = DBI->connect($data_source,$user,$pw ,{ RaiseError => 1, PrintError =>1});
$dbh->disconnect;
exit 0;

Let me know if there's any problem...
quoted from Martin Flemming

Francesco


-----Original Message-----
From: Martin Flemming [mailto:user-f286aaa49a76@xymon.invalid]
Sent: venerdì 31 luglio 2009 0.28
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] dbcheck for RAC connections refused


Hi !

Unfortunatley, i've got no luck till yet ...

I've cleaned up my dbcheck.ini like this, also without any spaces ...


# cat etc/dbcheck.ini|grep -v \#


[default]
warningout              = send
conn                    = conn
include                 =
defaultgroup            =
timeoutdbconn           = 20s
timeoudbtselect         = 1h
oraclehome              = /opt/products/oracle-client/10.2g/
fastcheck               = 30m
mediumcheck             = 2h
slowcheck               = 6h
bbdisplay               = localhost
bbsendtype              = multi
singlesendashost        = no
bbconncolumn            = ChkConn::fast
bbauditcolumn           = Audit::fast
bbtablespacecolumn      = TblSpace::fast
bbextentcolumn          = Extent::slow
bbhitcachecolumn        = HitCache::fast
bbmemreqcolumn          = MemReq::fast
bbrollbackcolumn        = RollBack::slow
bbinvobjcolumn          = InvObj::fast
bblockscolumn           = Locks::fast
bbsessioncolumn         = Session::fast
bbsessionuserlist       = yes
username                = XXXXXXXXXX
password                = XXXXXXXXXXXXXXxx
tblspcheck              = 90:95
tblspreportautoext      = 90:95
pinlibcheck             = 95:90
blbuffcheck             = 95:90
hitcachecheck           = 95:90
rowcachecheck           = 95:90
extentcheck             = 90:95
rollbackcheck           = 90:95
sessioncheck            = 90:95
processcheck            = 90:95
rb.SYSTEM               = 101:101
invobjwarn              = :::
invobjignore            =
dbtype                  = Oracle


[atlast1]
hostname                = lcg3d-a-v-1
port                    = 1521
username                = XXXXXXXXXXX
password                = XXXXXXXXXXXXX
bbauditcolumn           = Audit:notest
bbtablespacecolumn      = TblSpace:notest
bbextentcolumn          = Extent:notest
bbrollbackcolumn        = RollBack:notest
bblockscolumn           = Locks:notest
bbinvobjcolumn          = InvObj:notest


[atlast2]
hostname                = lcg3d-a-v-2
port                    = 1521
bbauditcolumn             = Audit:notest
bbtablespacecolumn      = TblSpace:notest
bbextentcolumn          = Extent:notest
bbrollbackcolumn        = RollBack:notest
bblockscolumn           = Locks:notest
bbinvobjcolumn          = InvObj:notest
username                = XXXXXXXXXXx
password                = XXXXXXXXXXXXXX


[atlast3]
hostname                = lcg3d-a-v-3
port                    = 1521
bbauditcolumn             = Audit:notest
bbtablespacecolumn      = TblSpace:notest
bbextentcolumn          = Extent:notest
bbrollbackcolumn        = RollBack:notest
bblockscolumn           = Locks:notest
bbinvobjcolumn          = InvObj:notest
username                = XXXXXX
password                = XXXXXXXXXX


[atlast4]
hostname                = lcg3d-a-v-4
port                    = 1521
username                = XXXXXXX
password                = XXXXXXXXXXX
bbauditcolumn             = Audit:notest
bbtablespacecolumn      = TblSpace:notest
bbextentcolumn          = Extent:notest
bbrollbackcolumn        = RollBack:notest
bblockscolumn           = Locks:notest
bbinvobjcolumn          = InvObj:notest


[atlas_tag_db]
oraclerac               = yes
port                    = 1521
username                = XXXXXXXX
password                = XXXXXXXXX
bbhitcachecolumn        = HitCache:notest
bbmemreqcolumn          = MemReq:notest


The output of the test is :

l Stats
Test Time    = 00:00:01
Host Checked = 5
Status Msg   = 29

Colors                   Colors
clear                       24
red                          5

Events                   Events
Audit                        1
ChkConn                      5
Extent                       1
HitCache                     4
InvObj                       1
Locks                        1
MemReq                       4
RollBack                     1
Session                      5
TblSpace                     1
uptime                       5

Types                     Types
status+30m                  22
status+60                    5
status+6h                    2

Hosts Summary
Hosts                     clear        red     Number      Times
atlas_tag_db                  8          1          9   00:00:00
atlast1                       4          1          5   00:00:00
atlast2                       4          1          5   00:00:00
atlast3                       4          1          5   00:00:00
atlast4                       4          1          5   00:00:00

Hosts Summary
Hosts                     Audit    ChkConn     Extent   HitCache
InvObj      Locks     MemReq   RollBack    Session   TblSpace     uptime
atlas_tag_db                  1          1          1          0
1          1          0          1          1          1          1
atlast1                       0          1          0          1
0          0          1          0          1          0          1
atlast2                       0          1          0          1
0          0          1          0          1          0          1
atlast3                       0          1          0          1
0          0          1          0          1          0          1
atlast4                       0          1          0          1
0          0          1          0          1          0          1

Errors
No General Errors
atlas_tag_db
Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to DBI:Oracle:atlas_tag_db!
atlast1
Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-1;port=1521;sid=atlast1!
atlast2
Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-2;port=1521;sid=atlast2!
atlast3
Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-3;port=1521;sid=atlast3!
atlast4
Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-4;port=1521;sid=atlast4!

Warnings
No General Warnings

In tnsnames.ora (under ORACLE_HOME/network/admin) I've those configuration:
This is a good point, i can't use the tnsnames.ora, because my
oracle-software is placed in the global filesystem AFS ...

So, could this be a problem, if i have to got all informations only from dbcheck.ini ?

You can also try to connect with a telnet to the hostname and listener port

Yep, telnet to port 1521 is working .. to  lcg3d-a-v-1/4

here my enviroment:

bin/bbcmd  ext/dbcheck.pl -v
2009-07-31 00:04:28 Using default environment file /usr/lib/hobbit/server/etc/hobbitserver.cfg
Program Information
         dbcheck.pl version 1.09
         Hobbit_fd_lib.pm version 1.16

OS Information
         Linux it-wgs02 2.6.9-78.0.22.ELsmp #1 SMP Thu Apr 30 23:30:54 CDT
2009 i686 i686 i386 GNU/Linux
         Perl version is v5.8.5

Module Information
         FindBin 1.44
         POSIX 1.08
         Text::Wrap 2001.09292
         Time::Local 1.1
         Sys::SigAction 0.04
         Config::IniFiles 2.39
         DBI 1.605
         DBD::DBM 0.03
         DBD::ExampleP 12.010007
         DBD::File 0.35
         DBD::Gofer 0.011377
         DBD::Oracle 1.23
         DBD::Proxy 0.2004
         DBD::Sponge 12.010002


Hmm, misterious ..

        martin


On Thu, 30 Jul 2009, Francesco Duranti wrote:
This is what i normally do to check a RAC DB + single RAC instance in the configuration:

oraclehome              = /usr/local/oracle/10.2.0/client/
bbdisplay               = localhost
bbconncolumn            = ChkConn::fast
bbauditcolumn           = Audit::fast
bbtablespacecolumn      = TblSpace::fast
bbextentcolumn          = Extent::slow
bbhitcachecolumn        = HitCache::fast
bbmemreqcolumn          = MemReq::fast
bbrollbackcolumn        = RollBack::slow
bbinvobjcolumn          = InvObj::fast
bblockscolumn           = Locks::fast
bbsessioncolumn         = Session::fast
bbsessionuserlist       = yes
username                = userxxx
password                = pwxxxxx

[CL10G]
oraclerac               = yes
bbhitcachecolumn        = HitCache:notest
bbmemreqcolumn          = MemReq:notest

[CL10G1]
hostname                = itromdb21
bbauditcolumn           = Audit:notest
bbtablespacecolumn      = TblSpace:notest
bbextentcolumn          = Extent:notest
bbrollbackcolumn        = RollBack:notest
bblockscolumn           = Locks:notest
bbinvobjcolumn          = InvObj:notest

[CL10G2]
hostname                = itromdb22
bbauditcolumn           = Audit:notest
bbtablespacecolumn      = TblSpace:notest
bbextentcolumn          = Extent:notest
bbrollbackcolumn        = RollBack:notest
bblockscolumn           = Locks:notest
bbinvobjcolumn          = InvObj:notest


In tnsnames.ora (under ORACLE_HOME/network/admin) I've those configuration:

CL10G =
 (DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB21)(PORT = 1521))
   (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB22)(PORT = 1521))
   (LOAD_BALANCE = no)
   (CONNECT_DATA =
     (SERVER = DEDICATED)
     (SERVICE_NAME = cl10g)
   )
 )

CL10G2 =
 (DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB22)(PORT = 1521))
   (CONNECT_DATA =
     (SERVER = DEDICATED)
     (SERVICE_NAME = cl10g)
     (INSTANCE_NAME = cl10g2)
   )
 )

CL10G1 =
 (DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB21)(PORT = 1521))
   (CONNECT_DATA =
     (SERVER = DEDICATED)
     (SERVICE_NAME = cl10g)
     (INSTANCE_NAME = cl10g1)
   )
 )


With this setting I normally use the tnsnames.ora configuration for RAC (I was able to check RAC database only using tnsnames.ora not directly.
You  can try to remove the hostname and port from the db configuration for the RAC.
If the SID is equal to the name of the DB to check (the one in []) you can also remove the sid line from the configuration.

You can also try to connect with a telnet to the hostname and listener port to see if it answer (or better you can configure on the client the tnsnames.ora and do a tnsping to see if the instances are answering).

As you can see I don't do some checks on the RAC itselft or on the single instances... For example I don't test memreq and hitcache on the RAC and I don't check TblSpace, Extent, Rollback, locks, invalid objects on the single instances.


Please check also on the configuration file and remove all ending space after host or port or sid. I don't know if it can create problems (I'll check this also and remove those from the configuration option for the next version).


Let me know if this work for you or you have other problems.

Francesco


-----Original Message-----
From: Martin Flemming [mailto:user-f286aaa49a76@xymon.invalid]
Sent: giovedì 30 luglio 2009 11.47
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] dbcheck for RAC connections refused


Hi, Franceso !

Thanks for the hint, it looks better/cleaner now, but the error is still exist ...

"
/usr/lib/hobbit/server #  bin/bbcmd ext/dbcheck.pl -t atlast1
2009-07-30 08:08:28 Using default environment file /usr/lib/hobbit/server/etc/hobbitserver.cfg
Thu Jul 30 08:08:29 2009:ERROR on atlast1: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !
"


[it-wgs02] /usr/lib/hobbit/server #  bin/bbcmd perl -d  ext/dbcheck.pl -t atlast1
2009-07-30 08:05:59 Using default environment file /usr/lib/hobbit/server/etc/hobbitserver.cfg

Loading DB routines from perl5db.pl version 1.27
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1222):1222:           &load_config ;  DB<1> n
Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1223):1223:           &get_disabled_hosts;  DB<1> n
Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1224):1224:           my $pv=sprintf "%vd", $^V;  DB<1> n
Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1225):1225:           my $sv=$Sys::SigAction::VERSION;  DB<1> n
Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1226):1226:           if (($pv =~ /5\.8\.0/) && ($sv !~ /0\.09/)) {  DB<1> n
main::(ext/dbcheck.pl:39):      my ($orahome, @listahost, $dbhost, $port, $username, $password, $dbtype, $sid,$onlycustomcheck);  DB<1> n
main::(ext/dbcheck.pl:40):      my (%warnhash,%alerthash,$invobjignore,$invobjwarn, at invobjwlist, at invobjilist,$checkuserlist,%customcheck);  DB<1> n
main::(ext/dbcheck.pl:41):      my ($sendtv,$singlesendas,%selcmd,$raccheck, @KeyToCheck, at CustomKeyToCheck);  DB<1> n
main::(ext/dbcheck.pl:43):      my %DBCHECK = (main::(ext/dbcheck.pl:44):                     oracle           => [ "fulltest","conn","audit","tablespace","extent","hitcache","memreq",
main::(ext/dbcheck.pl:45):                                           "rollback","invobj","locks","session" ],
main::(ext/dbcheck.pl:46):                     oracledef        => [ "Database","ChkConn::fast","Audit::fast","TblSpace::fast","Extent::slow",
main::(ext/dbcheck.pl:47):                                           "HitCache::fast","MemReq::fast", "RollBack::slow","InvObj::fast",
main::(ext/dbcheck.pl:48):                                           "Locks::fast","Session::fast" ],
main::(ext/dbcheck.pl:49):                     informix         => [ "fulltest","conn","tablespace" ],
main::(ext/dbcheck.pl:50):                     informixdef      => [ "Database","ChkConn::fast","TblSpace::fast" ],
main::(ext/dbcheck.pl:51):                     sqlserver        => [ "fulltest","conn","tablespace" ],
main::(ext/dbcheck.pl:52):                     sqlserverdef     => [ "Database","ChkConn::fast","TblSpace::fast" ],
main::(ext/dbcheck.pl:53):                     mysql            => [ "fulltest","conn","mysqlperf" ],
main::(ext/dbcheck.pl:54):                     mysqldef         => [ "MySQL","ChkConn::fast","mysqlperf::fast" ],
main::(ext/dbcheck.pl:55):                     db2              => [ "fulltest","conn","tablespace" ],
main::(ext/dbcheck.pl:56):                     db2def           => [ "DB2","ChkConn::fast","TblSpace::fast" ],
main::(ext/dbcheck.pl:57):                   );  DB<1> n
main::(ext/dbcheck.pl:59):      my $CHECKLIST = [ "pinlib:95:90", "blbuff:95:90", "rowcache:95:90", "tblsp:90:95", "hitcache:95:90", "rollback:90:95",
main::(ext/dbcheck.pl:60):                                      "session:90:95", "process:90:95", "memreq:90:95", "extent:90:95" ];  DB<1> n
main::(ext/dbcheck.pl:63):              @listahost=&Hobbit_fd_lib::get_server_to_test($TEST) if (!@listahost);  DB<1> n
main::(ext/dbcheck.pl:64):              &Hobbit_fd_lib::execute_thread(\&execute_db_test , at listahost);  DB<1> n
Thu Jul 30 08:06:27 2009:ERROR on atlast1: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !

Debugged program terminated.  Use q to quit or R to restart,
  use O inhibit_exit to avoid stopping after program termination,
  h q, h R or h O to get additional info.
main::(ext/dbcheck.pl:65):              exit;
  DB<1>

... and the logfile e.g.

Thu Jul 30 11:45:37 2009:ERROR on atlas_tag_db: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-4   ;port=1521         ;sid=atlas_tag_db  !
Thu Jul 30 11:45:37 2009:ERROR on atlast1: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !
Thu Jul 30 11:45:37 2009:ERROR on atlast3: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-3  ;port=1521          ;sid=atlast3       !
Thu Jul 30 11:45:37 2009:ERROR on atlast2: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-2   ;port=1521          ;sid=atlast2       !
Thu Jul 30 11:45:37 2009:ERROR on atlast4: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-4  ;port=1521         ;sid=atlast4   !


Any suggestions for further debugging ?

thanks & cheers

      martin


On Thu, 30 Jul 2009, Francesco Duranti wrote:
Hi,
dbcheck.pl (and the other scripts in the package) use the CONFIG::IniFiles to read configuration data. CONFIG::Inifiles allow comment line starting with "#" and ";" but I think it will not recognize the "#" comment at the middle of a line so if you need comments you should put them alone on the line before or next to the line to comment on.

On some of the sample config file I've put some comment next to parameters and this could probably generate confusion. I'll change the sample config file and put this behavious also in the documentation I'm writing for the next version (the actual documentation is not really well written and organized).


Francesco


On Wed, July 29, 2009 15:29, user-f286aaa49a76@xymon.invalid wrote:
Hi !

I want to use dbcheck.pl from

http://sourceforge.net/projects/hobbit-perl-cl/

.. but unfortunatley something is going wrong, i get only
"Connection Refused" Messages and no data  .. :-(

My config is below:
[SNIP]
dbcheck.ini:

oraclehome              = /opt/products/oracle-client/10.2g/
username                = XXXX
password                = XXXXXXXXXXXXXXXXXXXXXXX


[atlas_tag_db]
dbtype                  = Oracle
oraclerac               = yes
hostname                = lcg3d-a-v-4   # hostname of the rac instance n.2
sid                     = atlas_tag_db  # sid of the rac instance n.2
port                    = 1521          # port of listener on rac instance

I don't use this code, but your error output suggests that it's trying to
use your hostname, sid, and port from dbcheck.ini exactly as written,
comments and all.  I don't see anything in the sample dbcheck.ini file
that suggests that you can use trailing comments in the way that you are
doing, so perhaps you should try without those.

list Martin Flemming · Wed, 5 Aug 2009 21:34:16 +0200 (CEST) ·
Hi !
.. was some days on holiday .. ;-)

Thanks a lot for help !

.. indeed, something is going wrong, with the communication to the rac-database ..

you see, i'm not a oracle-expert ...
i will contact my second oracle-admin and will ask him,
whats going wrong with the configuration from my first oracle-admin ...

Thanks, i will report ...

cheers,
 	martin
quoted from Francesco Duranti


On Fri, 31 Jul 2009, Francesco Duranti wrote:
This is really strange.
Regarding the RAC test it cannot be done without the tnsnames.ora configuration.
What's the problem regarding the tnsnames.ora? does it exists?

The timeout problem seems also strange because it's like your client could not reach the database.
You should try to connect to the oracle client (sqlplus).

You can also try with this perl script

#/usr/bin/perl
use DBI;
$ENV{'ORACLE_HOME'}="/usr/local/oracle/10.2.0/client/";
$dbhost="hostname";
$port=1521;
$sid="SID";
$user="user";
$pw="password";
$data_source="DBI:Oracle:host=$dbhost;port=$port;sid=$sid";
$dbh = DBI->connect($data_source,$user,$pw ,{ RaiseError => 1, PrintError =>1});
$dbh->disconnect;
exit 0;

Let me know if there's any problem...

Francesco


-----Original Message-----
From: Martin Flemming [mailto:user-f286aaa49a76@xymon.invalid]
Sent: venerdì 31 luglio 2009 0.28
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] dbcheck for RAC connections refused


Hi !

Unfortunatley, i've got no luck till yet ...

I've cleaned up my dbcheck.ini like this, also without any spaces ...


# cat etc/dbcheck.ini|grep -v \#


[default]
warningout              = send
conn                    = conn
include                 =
defaultgroup            =
timeoutdbconn           = 20s
timeoudbtselect         = 1h
oraclehome              = /opt/products/oracle-client/10.2g/
fastcheck               = 30m
mediumcheck             = 2h
slowcheck               = 6h
bbdisplay               = localhost
bbsendtype              = multi
singlesendashost        = no
bbconncolumn            = ChkConn::fast
bbauditcolumn           = Audit::fast
bbtablespacecolumn      = TblSpace::fast
bbextentcolumn          = Extent::slow
bbhitcachecolumn        = HitCache::fast
bbmemreqcolumn          = MemReq::fast
bbrollbackcolumn        = RollBack::slow
bbinvobjcolumn          = InvObj::fast
bblockscolumn           = Locks::fast
bbsessioncolumn         = Session::fast
bbsessionuserlist       = yes
username                = XXXXXXXXXX
password                = XXXXXXXXXXXXXXxx
tblspcheck              = 90:95
tblspreportautoext      = 90:95
pinlibcheck             = 95:90
blbuffcheck             = 95:90
hitcachecheck           = 95:90
rowcachecheck           = 95:90
extentcheck             = 90:95
rollbackcheck           = 90:95
sessioncheck            = 90:95
processcheck            = 90:95
rb.SYSTEM               = 101:101
invobjwarn              = :::
invobjignore            =
dbtype                  = Oracle


[atlast1]
hostname                = lcg3d-a-v-1
port                    = 1521
username                = XXXXXXXXXXX
password                = XXXXXXXXXXXXX
bbauditcolumn           = Audit:notest
bbtablespacecolumn      = TblSpace:notest
bbextentcolumn          = Extent:notest
bbrollbackcolumn        = RollBack:notest
bblockscolumn           = Locks:notest
bbinvobjcolumn          = InvObj:notest


[atlast2]
hostname                = lcg3d-a-v-2
port                    = 1521
bbauditcolumn             = Audit:notest
bbtablespacecolumn      = TblSpace:notest
bbextentcolumn          = Extent:notest
bbrollbackcolumn        = RollBack:notest
bblockscolumn           = Locks:notest
bbinvobjcolumn          = InvObj:notest
username                = XXXXXXXXXXx
password                = XXXXXXXXXXXXXX


[atlast3]
hostname                = lcg3d-a-v-3
port                    = 1521
bbauditcolumn             = Audit:notest
bbtablespacecolumn      = TblSpace:notest
bbextentcolumn          = Extent:notest
bbrollbackcolumn        = RollBack:notest
bblockscolumn           = Locks:notest
bbinvobjcolumn          = InvObj:notest
username                = XXXXXX
password                = XXXXXXXXXX


[atlast4]
hostname                = lcg3d-a-v-4
port                    = 1521
username                = XXXXXXX
password                = XXXXXXXXXXX
bbauditcolumn             = Audit:notest
bbtablespacecolumn      = TblSpace:notest
bbextentcolumn          = Extent:notest
bbrollbackcolumn        = RollBack:notest
bblockscolumn           = Locks:notest
bbinvobjcolumn          = InvObj:notest


[atlas_tag_db]
oraclerac               = yes
port                    = 1521
username                = XXXXXXXX
password                = XXXXXXXXX
bbhitcachecolumn        = HitCache:notest
bbmemreqcolumn          = MemReq:notest


The output of the test is :

l Stats
Test Time    = 00:00:01
Host Checked = 5
Status Msg   = 29

Colors                   Colors
clear                       24
red                          5

Events                   Events
Audit                        1
ChkConn                      5
Extent                       1
HitCache                     4
InvObj                       1
Locks                        1
MemReq                       4
RollBack                     1
Session                      5
TblSpace                     1
uptime                       5

Types                     Types
status+30m                  22
status+60                    5
status+6h                    2

Hosts Summary
Hosts                     clear        red     Number      Times
atlas_tag_db                  8          1          9   00:00:00
atlast1                       4          1          5   00:00:00
atlast2                       4          1          5   00:00:00
atlast3                       4          1          5   00:00:00
atlast4                       4          1          5   00:00:00

Hosts Summary
Hosts                     Audit    ChkConn     Extent   HitCache
InvObj      Locks     MemReq   RollBack    Session   TblSpace     uptime
atlas_tag_db                  1          1          1          0
1          1          0          1          1          1          1
atlast1                       0          1          0          1
0          0          1          0          1          0          1
atlast2                       0          1          0          1
0          0          1          0          1          0          1
atlast3                       0          1          0          1
0          0          1          0          1          0          1
atlast4                       0          1          0          1
0          0          1          0          1          0          1

Errors
No General Errors
atlas_tag_db
Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to DBI:Oracle:atlas_tag_db!
atlast1
Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-1;port=1521;sid=atlast1!
atlast2
Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-2;port=1521;sid=atlast2!
atlast3
Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-3;port=1521;sid=atlast3!
atlast4
Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-4;port=1521;sid=atlast4!

Warnings
No General Warnings

In tnsnames.ora (under ORACLE_HOME/network/admin) I've those configuration:
This is a good point, i can't use the tnsnames.ora, because my
oracle-software is placed in the global filesystem AFS ...

So, could this be a problem, if i have to got all informations only from dbcheck.ini ?

You can also try to connect with a telnet to the hostname and listener port

Yep, telnet to port 1521 is working .. to  lcg3d-a-v-1/4

here my enviroment:

bin/bbcmd  ext/dbcheck.pl -v
2009-07-31 00:04:28 Using default environment file /usr/lib/hobbit/server/etc/hobbitserver.cfg
Program Information
        dbcheck.pl version 1.09
        Hobbit_fd_lib.pm version 1.16

OS Information
        Linux it-wgs02 2.6.9-78.0.22.ELsmp #1 SMP Thu Apr 30 23:30:54 CDT
2009 i686 i686 i386 GNU/Linux
        Perl version is v5.8.5

Module Information
        FindBin 1.44
        POSIX 1.08
        Text::Wrap 2001.09292
        Time::Local 1.1
        Sys::SigAction 0.04
        Config::IniFiles 2.39
        DBI 1.605
        DBD::DBM 0.03
        DBD::ExampleP 12.010007
        DBD::File 0.35
        DBD::Gofer 0.011377
        DBD::Oracle 1.23
        DBD::Proxy 0.2004
        DBD::Sponge 12.010002


Hmm, misterious ..

       martin


On Thu, 30 Jul 2009, Francesco Duranti wrote:
This is what i normally do to check a RAC DB + single RAC instance in the configuration:

oraclehome              = /usr/local/oracle/10.2.0/client/
bbdisplay               = localhost
bbconncolumn            = ChkConn::fast
bbauditcolumn           = Audit::fast
bbtablespacecolumn      = TblSpace::fast
bbextentcolumn          = Extent::slow
bbhitcachecolumn        = HitCache::fast
bbmemreqcolumn          = MemReq::fast
bbrollbackcolumn        = RollBack::slow
bbinvobjcolumn          = InvObj::fast
bblockscolumn           = Locks::fast
bbsessioncolumn         = Session::fast
bbsessionuserlist       = yes
username                = userxxx
password                = pwxxxxx

[CL10G]
oraclerac               = yes
bbhitcachecolumn        = HitCache:notest
bbmemreqcolumn          = MemReq:notest

[CL10G1]
hostname                = itromdb21
bbauditcolumn           = Audit:notest
bbtablespacecolumn      = TblSpace:notest
bbextentcolumn          = Extent:notest
bbrollbackcolumn        = RollBack:notest
bblockscolumn           = Locks:notest
bbinvobjcolumn          = InvObj:notest

[CL10G2]
hostname                = itromdb22
bbauditcolumn           = Audit:notest
bbtablespacecolumn      = TblSpace:notest
bbextentcolumn          = Extent:notest
bbrollbackcolumn        = RollBack:notest
bblockscolumn           = Locks:notest
bbinvobjcolumn          = InvObj:notest


In tnsnames.ora (under ORACLE_HOME/network/admin) I've those configuration:

CL10G =
 (DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB21)(PORT = 1521))
   (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB22)(PORT = 1521))
   (LOAD_BALANCE = no)
   (CONNECT_DATA =
     (SERVER = DEDICATED)
     (SERVICE_NAME = cl10g)
   )
 )

CL10G2 =
 (DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB22)(PORT = 1521))
   (CONNECT_DATA =
     (SERVER = DEDICATED)
     (SERVICE_NAME = cl10g)
     (INSTANCE_NAME = cl10g2)
   )
 )

CL10G1 =
 (DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB21)(PORT = 1521))
   (CONNECT_DATA =
     (SERVER = DEDICATED)
     (SERVICE_NAME = cl10g)
     (INSTANCE_NAME = cl10g1)
   )
 )


With this setting I normally use the tnsnames.ora configuration for RAC (I was able to check RAC database only using tnsnames.ora not directly.
You  can try to remove the hostname and port from the db configuration for the RAC.
If the SID is equal to the name of the DB to check (the one in []) you can also remove the sid line from the configuration.

You can also try to connect with a telnet to the hostname and listener port to see if it answer (or better you can configure on the client the tnsnames.ora and do a tnsping to see if the instances are answering).

As you can see I don't do some checks on the RAC itselft or on the single instances... For example I don't test memreq and hitcache on the RAC and I don't check TblSpace, Extent, Rollback, locks, invalid objects on the single instances.


Please check also on the configuration file and remove all ending space after host or port or sid. I don't know if it can create problems (I'll check this also and remove those from the configuration option for the next version).


Let me know if this work for you or you have other problems.

Francesco


-----Original Message-----
From: Martin Flemming [mailto:user-f286aaa49a76@xymon.invalid]
Sent: giovedì 30 luglio 2009 11.47
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] dbcheck for RAC connections refused


Hi, Franceso !

Thanks for the hint, it looks better/cleaner now, but the error is still exist ...

"
/usr/lib/hobbit/server #  bin/bbcmd ext/dbcheck.pl -t atlast1
2009-07-30 08:08:28 Using default environment file /usr/lib/hobbit/server/etc/hobbitserver.cfg
Thu Jul 30 08:08:29 2009:ERROR on atlast1: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !
"


[it-wgs02] /usr/lib/hobbit/server #  bin/bbcmd perl -d  ext/dbcheck.pl -t atlast1
2009-07-30 08:05:59 Using default environment file /usr/lib/hobbit/server/etc/hobbitserver.cfg

Loading DB routines from perl5db.pl version 1.27
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1222):1222:           &load_config ;  DB<1> n
Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1223):1223:           &get_disabled_hosts;  DB<1> n
Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1224):1224:           my $pv=sprintf "%vd", $^V;  DB<1> n
Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1225):1225:           my $sv=$Sys::SigAction::VERSION;  DB<1> n
Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1226):1226:           if (($pv =~ /5\.8\.0/) && ($sv !~ /0\.09/)) {  DB<1> n
main::(ext/dbcheck.pl:39):      my ($orahome, @listahost, $dbhost, $port, $username, $password, $dbtype, $sid,$onlycustomcheck);  DB<1> n
main::(ext/dbcheck.pl:40):      my (%warnhash,%alerthash,$invobjignore,$invobjwarn, at invobjwlist, at invobjilist,$checkuserlist,%customcheck);  DB<1> n
main::(ext/dbcheck.pl:41):      my ($sendtv,$singlesendas,%selcmd,$raccheck, @KeyToCheck, at CustomKeyToCheck);  DB<1> n
main::(ext/dbcheck.pl:43):      my %DBCHECK = (main::(ext/dbcheck.pl:44):                     oracle           => [ "fulltest","conn","audit","tablespace","extent","hitcache","memreq",
main::(ext/dbcheck.pl:45):                                           "rollback","invobj","locks","session" ],
main::(ext/dbcheck.pl:46):                     oracledef        => [ "Database","ChkConn::fast","Audit::fast","TblSpace::fast","Extent::slow",
main::(ext/dbcheck.pl:47):                                           "HitCache::fast","MemReq::fast", "RollBack::slow","InvObj::fast",
main::(ext/dbcheck.pl:48):                                           "Locks::fast","Session::fast" ],
main::(ext/dbcheck.pl:49):                     informix         => [ "fulltest","conn","tablespace" ],
main::(ext/dbcheck.pl:50):                     informixdef      => [ "Database","ChkConn::fast","TblSpace::fast" ],
main::(ext/dbcheck.pl:51):                     sqlserver        => [ "fulltest","conn","tablespace" ],
main::(ext/dbcheck.pl:52):                     sqlserverdef     => [ "Database","ChkConn::fast","TblSpace::fast" ],
main::(ext/dbcheck.pl:53):                     mysql            => [ "fulltest","conn","mysqlperf" ],
main::(ext/dbcheck.pl:54):                     mysqldef         => [ "MySQL","ChkConn::fast","mysqlperf::fast" ],
main::(ext/dbcheck.pl:55):                     db2              => [ "fulltest","conn","tablespace" ],
main::(ext/dbcheck.pl:56):                     db2def           => [ "DB2","ChkConn::fast","TblSpace::fast" ],
main::(ext/dbcheck.pl:57):                   );  DB<1> n
main::(ext/dbcheck.pl:59):      my $CHECKLIST = [ "pinlib:95:90", "blbuff:95:90", "rowcache:95:90", "tblsp:90:95", "hitcache:95:90", "rollback:90:95",
main::(ext/dbcheck.pl:60):                                      "session:90:95", "process:90:95", "memreq:90:95", "extent:90:95" ];  DB<1> n
main::(ext/dbcheck.pl:63):              @listahost=&Hobbit_fd_lib::get_server_to_test($TEST) if (!@listahost);  DB<1> n
main::(ext/dbcheck.pl:64):              &Hobbit_fd_lib::execute_thread(\&execute_db_test , at listahost);  DB<1> n
Thu Jul 30 08:06:27 2009:ERROR on atlast1: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !

Debugged program terminated.  Use q to quit or R to restart,
  use O inhibit_exit to avoid stopping after program termination,
  h q, h R or h O to get additional info.
main::(ext/dbcheck.pl:65):              exit;
  DB<1>

... and the logfile e.g.

Thu Jul 30 11:45:37 2009:ERROR on atlas_tag_db: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-4   ;port=1521         ;sid=atlas_tag_db  !
Thu Jul 30 11:45:37 2009:ERROR on atlast1: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !
Thu Jul 30 11:45:37 2009:ERROR on atlast3: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-3  ;port=1521          ;sid=atlast3       !
Thu Jul 30 11:45:37 2009:ERROR on atlast2: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-2   ;port=1521          ;sid=atlast2       !
Thu Jul 30 11:45:37 2009:ERROR on atlast4: Timeout connecting to DBI:Oracle:host=lcg3d-a-v-4  ;port=1521         ;sid=atlast4   !


Any suggestions for further debugging ?

thanks & cheers

      martin


On Thu, 30 Jul 2009, Francesco Duranti wrote:
Hi,
dbcheck.pl (and the other scripts in the package) use the CONFIG::IniFiles to read configuration data. CONFIG::Inifiles allow comment line starting with "#" and ";" but I think it will not recognize the "#" comment at the middle of a line so if you need comments you should put them alone on the line before or next to the line to comment on.

On some of the sample config file I've put some comment next to parameters and this could probably generate confusion. I'll change the sample config file and put this behavious also in the documentation I'm writing for the next version (the actual documentation is not really well written and organized).


Francesco


On Wed, July 29, 2009 15:29, user-f286aaa49a76@xymon.invalid wrote:
Hi !

I want to use dbcheck.pl from

http://sourceforge.net/projects/hobbit-perl-cl/

.. but unfortunatley something is going wrong, i get only
"Connection Refused" Messages and no data  .. :-(

My config is below:
[SNIP]
dbcheck.ini:

oraclehome              = /opt/products/oracle-client/10.2g/
username                = XXXX
password                = XXXXXXXXXXXXXXXXXXXXXXX


[atlas_tag_db]
dbtype                  = Oracle
oraclerac               = yes
hostname                = lcg3d-a-v-4   # hostname of the rac instance n.2
sid                     = atlas_tag_db  # sid of the rac instance n.2
port                    = 1521          # port of listener on rac instance

I don't use this code, but your error output suggests that it's trying to
use your hostname, sid, and port from dbcheck.ini exactly as written,
comments and all.  I don't see anything in the sample dbcheck.ini file
that suggests that you can use trailing comments in the way that you are
doing, so perhaps you should try without those.

list Martin Flemming · Wed, 9 Sep 2009 11:16:34 +0200 (CEST) ·
Hi, again !

My setup works now for the RAC-instances ... ;-)

of course a configuration-error by me and my oracle-admin ..

But unfortunatley not for the RAC-DB ..

Indeed the message is clear

  Wed Sep 09 09:24:46 2009 Connection Check Failed

and

ORA-12154: TNS:could not resolve the connect identifier specified (DBD ERROR: OCIServerAttach)

Because, i've got an local tnsnames.ora for this RAC-Cluster .. and not our global oracle-enviroment and tnsnames.ora ...

Is there a possibility to make an variable in dbcheck.ini for the  place of the tnsnames.ora ?

thanks & cheers,

 	martin
quoted from Martin Flemming


On Wed, 5 Aug 2009, Martin Flemming wrote:
Hi !
.. was some days on holiday .. ;-)

Thanks a lot for help !

.. indeed, something is going wrong, with the communication to the rac-database ..

you see, i'm not a oracle-expert ...
i will contact my second oracle-admin and will ask him,
whats going wrong with the configuration from my first oracle-admin ...

Thanks, i will report ...

cheers,
	 martin


On Fri, 31 Jul 2009, Francesco Duranti wrote:
 This is really strange.
 Regarding the RAC test it cannot be done without the tnsnames.ora
 configuration.
 What's the problem regarding the tnsnames.ora? does it exists?

 The timeout problem seems also strange because it's like your client could
 not reach the database.
 You should try to connect to the oracle client (sqlplus).

 You can also try with this perl script

 #/usr/bin/perl
 use DBI;
 $ENV{'ORACLE_HOME'}="/usr/local/oracle/10.2.0/client/";
 $dbhost="hostname";
 $port=1521;
 $sid="SID";
 $user="user";
 $pw="password";
 $data_source="DBI:Oracle:host=$dbhost;port=$port;sid=$sid";
 $dbh = DBI->connect($data_source,$user,$pw ,{ RaiseError => 1, PrintError
 =>1});
 $dbh->disconnect;
 exit 0;

 Let me know if there's any problem...

 Francesco


 -----Original Message-----
 From: Martin Flemming [mailto:user-f286aaa49a76@xymon.invalid]
 Sent: venerdì 31 luglio 2009 0.28
 To: user-ae9b8668bcde@xymon.invalid
 Subject: RE: [hobbit] dbcheck for RAC connections refused


 Hi !

 Unfortunatley, i've got no luck till yet ...

 I've cleaned up my dbcheck.ini like this, also without any spaces ...


 # cat etc/dbcheck.ini|grep -v \#


 [default]
 warningout              = send
 conn                    = conn
 include                 =
 defaultgroup            =
 timeoutdbconn           = 20s
 timeoudbtselect         = 1h
 oraclehome              = /opt/products/oracle-client/10.2g/
 fastcheck               = 30m
 mediumcheck             = 2h
 slowcheck               = 6h
 bbdisplay               = localhost
 bbsendtype              = multi
 singlesendashost        = no
 bbconncolumn            = ChkConn::fast
 bbauditcolumn           = Audit::fast
 bbtablespacecolumn      = TblSpace::fast
 bbextentcolumn          = Extent::slow
 bbhitcachecolumn        = HitCache::fast
 bbmemreqcolumn          = MemReq::fast
 bbrollbackcolumn        = RollBack::slow
 bbinvobjcolumn          = InvObj::fast
 bblockscolumn           = Locks::fast
 bbsessioncolumn         = Session::fast
 bbsessionuserlist       = yes
 username                = XXXXXXXXXX
 password                = XXXXXXXXXXXXXXxx
 tblspcheck              = 90:95
 tblspreportautoext      = 90:95
 pinlibcheck             = 95:90
 blbuffcheck             = 95:90
 hitcachecheck           = 95:90
 rowcachecheck           = 95:90
 extentcheck             = 90:95
 rollbackcheck           = 90:95
 sessioncheck            = 90:95
 processcheck            = 90:95
 rb.SYSTEM               = 101:101
 invobjwarn              = :::
 invobjignore            =
 dbtype                  = Oracle


 [atlast1]
 hostname                = lcg3d-a-v-1
 port                    = 1521
 username                = XXXXXXXXXXX
 password                = XXXXXXXXXXXXX
 bbauditcolumn           = Audit:notest
 bbtablespacecolumn      = TblSpace:notest
 bbextentcolumn          = Extent:notest
 bbrollbackcolumn        = RollBack:notest
 bblockscolumn           = Locks:notest
 bbinvobjcolumn          = InvObj:notest


 [atlast2]
 hostname                = lcg3d-a-v-2
 port                    = 1521
 bbauditcolumn             = Audit:notest
 bbtablespacecolumn      = TblSpace:notest
 bbextentcolumn          = Extent:notest
 bbrollbackcolumn        = RollBack:notest
 bblockscolumn           = Locks:notest
 bbinvobjcolumn          = InvObj:notest
 username                = XXXXXXXXXXx
 password                = XXXXXXXXXXXXXX


 [atlast3]
 hostname                = lcg3d-a-v-3
 port                    = 1521
 bbauditcolumn             = Audit:notest
 bbtablespacecolumn      = TblSpace:notest
 bbextentcolumn          = Extent:notest
 bbrollbackcolumn        = RollBack:notest
 bblockscolumn           = Locks:notest
 bbinvobjcolumn          = InvObj:notest
 username                = XXXXXX
 password                = XXXXXXXXXX


 [atlast4]
 hostname                = lcg3d-a-v-4
 port                    = 1521
 username                = XXXXXXX
 password                = XXXXXXXXXXX
 bbauditcolumn             = Audit:notest
 bbtablespacecolumn      = TblSpace:notest
 bbextentcolumn          = Extent:notest
 bbrollbackcolumn        = RollBack:notest
 bblockscolumn           = Locks:notest
 bbinvobjcolumn          = InvObj:notest


 [atlas_tag_db]
 oraclerac               = yes
 port                    = 1521
 username                = XXXXXXXX
 password                = XXXXXXXXX
 bbhitcachecolumn        = HitCache:notest
 bbmemreqcolumn          = MemReq:notest


 The output of the test is :

 l Stats
 Test Time    = 00:00:01
 Host Checked = 5
 Status Msg   = 29

 Colors                   Colors
 clear                       24
 red                          5

 Events                   Events
 Audit                        1
 ChkConn                      5
 Extent                       1
 HitCache                     4
 InvObj                       1
 Locks                        1
 MemReq                       4
 RollBack                     1
 Session                      5
 TblSpace                     1
 uptime                       5

 Types                     Types
 status+30m                  22
 status+60                    5
 status+6h                    2

 Hosts Summary
 Hosts                     clear        red     Number      Times
 atlas_tag_db                  8          1          9   00:00:00
 atlast1                       4          1          5   00:00:00
 atlast2                       4          1          5   00:00:00
 atlast3                       4          1          5   00:00:00
 atlast4                       4          1          5   00:00:00

 Hosts Summary
 Hosts                     Audit    ChkConn     Extent   HitCache
 InvObj      Locks     MemReq   RollBack    Session   TblSpace     uptime
 atlas_tag_db                  1          1          1          0
 1          1          0          1          1          1          1
 atlast1                       0          1          0          1
 0          0          1          0          1          0          1
 atlast2                       0          1          0          1
 0          0          1          0          1          0          1
 atlast3                       0          1          0          1
 0          0          1          0          1          0          1
 atlast4                       0          1          0          1
 0          0          1          0          1          0          1

 Errors
 No General Errors
 atlas_tag_db
 Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to
 DBI:Oracle:atlas_tag_db!
 atlast1
 Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to
 DBI:Oracle:host=lcg3d-a-v-1;port=1521;sid=atlast1!
 atlast2
 Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to
 DBI:Oracle:host=lcg3d-a-v-2;port=1521;sid=atlast2!
 atlast3
 Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to
 DBI:Oracle:host=lcg3d-a-v-3;port=1521;sid=atlast3!
 atlast4
 Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to
 DBI:Oracle:host=lcg3d-a-v-4;port=1521;sid=atlast4!

 Warnings
 No General Warnings

 In tnsnames.ora (under ORACLE_HOME/network/admin) I've those >  configuration:
 This is a good point, i can't use the tnsnames.ora, because my
 oracle-software is placed in the global filesystem AFS ...

 So, could this be a problem, if i have to got all informations only from
 dbcheck.ini ?

 You can also try to connect with a telnet to the hostname and listener >  port

 Yep, telnet to port 1521 is working .. to  lcg3d-a-v-1/4

 here my enviroment:

 bin/bbcmd  ext/dbcheck.pl -v
 2009-07-31 00:04:28 Using default environment file
 /usr/lib/hobbit/server/etc/hobbitserver.cfg
 Program Information
         dbcheck.pl version 1.09
         Hobbit_fd_lib.pm version 1.16

 OS Information
         Linux it-wgs02 2.6.9-78.0.22.ELsmp #1 SMP Thu Apr 30 23:30:54 CDT
 2009 i686 i686 i386 GNU/Linux
         Perl version is v5.8.5

 Module Information
         FindBin 1.44
         POSIX 1.08
         Text::Wrap 2001.09292
         Time::Local 1.1
         Sys::SigAction 0.04
         Config::IniFiles 2.39
         DBI 1.605

DBD:: DBM 0.03
DBD:: ExampleP 12.010007
DBD:: File 0.35
DBD:: Gofer 0.011377
DBD:: Oracle 1.23
DBD:: Proxy 0.2004
DBD:: Sponge 12.010002
quoted from Martin Flemming


 Hmm, misterious ..

        martin


 On Thu, 30 Jul 2009, Francesco Duranti wrote:
 This is what i normally do to check a RAC DB + single RAC instance in >  the configuration:
 oraclehome              = /usr/local/oracle/10.2.0/client/
 bbdisplay               = localhost
 bbconncolumn            = ChkConn::fast
 bbauditcolumn           = Audit::fast
 bbtablespacecolumn      = TblSpace::fast
 bbextentcolumn          = Extent::slow
 bbhitcachecolumn        = HitCache::fast
 bbmemreqcolumn          = MemReq::fast
 bbrollbackcolumn        = RollBack::slow
 bbinvobjcolumn          = InvObj::fast
 bblockscolumn           = Locks::fast
 bbsessioncolumn         = Session::fast
 bbsessionuserlist       = yes
 username                = userxxx
 password                = pwxxxxx
 [CL10G]
 oraclerac               = yes
 bbhitcachecolumn        = HitCache:notest
 bbmemreqcolumn          = MemReq:notest
 [CL10G1]
 hostname                = itromdb21
 bbauditcolumn           = Audit:notest
 bbtablespacecolumn      = TblSpace:notest
 bbextentcolumn          = Extent:notest
 bbrollbackcolumn        = RollBack:notest
 bblockscolumn           = Locks:notest
 bbinvobjcolumn          = InvObj:notest
 [CL10G2]
 hostname                = itromdb22
 bbauditcolumn           = Audit:notest
 bbtablespacecolumn      = TblSpace:notest
 bbextentcolumn          = Extent:notest
 bbrollbackcolumn        = RollBack:notest
 bblockscolumn           = Locks:notest
 bbinvobjcolumn          = InvObj:notest
 In tnsnames.ora (under ORACLE_HOME/network/admin) I've those >  configuration:
 CL10G =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB21)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB22)(PORT = 1521))
    (LOAD_BALANCE = no)
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = cl10g)
) > ) > >  CL10G2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB22)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = cl10g)
      (INSTANCE_NAME = cl10g2)
) > ) > >  CL10G1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB21)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = cl10g)
      (INSTANCE_NAME = cl10g1)
) > ) > > >  With this setting I normally use the tnsnames.ora configuration for RAC >  (I was able to check RAC database only using tnsnames.ora not directly.
 You  can try to remove the hostname and port from the db configuration >  for the RAC.
 If the SID is equal to the name of the DB to check (the one in []) you >  can also remove the sid line from the configuration.
 You can also try to connect with a telnet to the hostname and listener >  port to see if it answer (or better you can configure on the client the >  tnsnames.ora and do a tnsping to see if the instances are answering).
 As you can see I don't do some checks on the RAC itselft or on the >  single instances... For example I don't test memreq and hitcache on the >  RAC and I don't check TblSpace, Extent, Rollback, locks, invalid objects >  on the single instances.
 Please check also on the configuration file and remove all ending space >  after host or port or sid. I don't know if it can create problems (I'll >  check this also and remove those from the configuration option for the >  next version).
 Let me know if this work for you or you have other problems.
 Francesco
 -----Original Message-----
 From: Martin Flemming [mailto:user-f286aaa49a76@xymon.invalid]
 Sent: giovedì 30 luglio 2009 11.47
 To: user-ae9b8668bcde@xymon.invalid
 Subject: RE: [hobbit] dbcheck for RAC connections refused
 Hi, Franceso !
 Thanks for the hint, it looks better/cleaner now, but the error is still >  exist ...
 "
 /usr/lib/hobbit/server #  bin/bbcmd ext/dbcheck.pl -t atlast1
 2009-07-30 08:08:28 Using default environment file >  /usr/lib/hobbit/server/etc/hobbitserver.cfg
 Thu Jul 30 08:08:29 2009:ERROR on atlast1: Timeout connecting to >  DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !
 "
 [it-wgs02] /usr/lib/hobbit/server #  bin/bbcmd perl -d  ext/dbcheck.pl >  -t atlast1
 2009-07-30 08:05:59 Using default environment file >  /usr/lib/hobbit/server/etc/hobbitserver.cfg
 Loading DB routines from perl5db.pl version 1.27
 Editor support available.
 Enter h or `h h' for help, or `man perldebug' for more help.
 Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1222):1222: >  &load_config ;  DB<1> n
 Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1223):1223: >  &get_disabled_hosts;  DB<1> n
 Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1224):1224: >  my $pv=sprintf "%vd", $^V;  DB<1> n
 Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1225):1225: >  my $sv=$Sys::SigAction::VERSION;  DB<1> n
 Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1226):1226: >  if (($pv =~ /5\.8\.0/) && ($sv !~ /0\.09/)) {  DB<1> n

main:: (ext/dbcheck.pl:39):      my ($orahome, @listahost, $dbhost, > main:: $port, $username, $password, $dbtype, $sid,$onlycustomcheck); > main:: DB<1> n
main:: (ext/dbcheck.pl:40):      my > main:: (%warnhash,%alerthash,$invobjignore,$invobjwarn, at invobjwlist, at invobjilist,$checkuserlist,%customcheck); > main:: DB<1> n
main:: (ext/dbcheck.pl:41):      my > main:: ($sendtv,$singlesendas,%selcmd,$raccheck, > main:: @KeyToCheck, at CustomKeyToCheck);  DB<1> n
main:: (ext/dbcheck.pl:43):      my %DBCHECK = > main:: (main::(ext/dbcheck.pl:44):                     oracle > main:: => [ > main:: "fulltest","conn","audit","tablespace","extent","hitcache","memreq",
main:: (ext/dbcheck.pl:45): > main:: "rollback","invobj","locks","session" ],
main:: (ext/dbcheck.pl:46):                     oracledef        => [ > main:: "Database","ChkConn::fast","Audit::fast","TblSpace::fast","Extent::slow",
main:: (ext/dbcheck.pl:47): > main:: "HitCache::fast","MemReq::fast", "RollBack::slow","InvObj::fast",
main:: (ext/dbcheck.pl:48): > main:: "Locks::fast","Session::fast" ],
main:: (ext/dbcheck.pl:49):                     informix         => [ > main:: "fulltest","conn","tablespace" ],
main:: (ext/dbcheck.pl:50):                     informixdef      => [ > main:: "Database","ChkConn::fast","TblSpace::fast" ],
main:: (ext/dbcheck.pl:51):                     sqlserver        => [ > main:: "fulltest","conn","tablespace" ],
main:: (ext/dbcheck.pl:52):                     sqlserverdef     => [ > main:: "Database","ChkConn::fast","TblSpace::fast" ],
main:: (ext/dbcheck.pl:53):                     mysql            => [ > main:: "fulltest","conn","mysqlperf" ],
main:: (ext/dbcheck.pl:54):                     mysqldef         => [ > main:: "MySQL","ChkConn::fast","mysqlperf::fast" ],
main:: (ext/dbcheck.pl:55):                     db2              => [ > main:: "fulltest","conn","tablespace" ],
main:: (ext/dbcheck.pl:56):                     db2def           => [ > main:: "DB2","ChkConn::fast","TblSpace::fast" ],
main:: (ext/dbcheck.pl:57):                   );  DB<1> n
main:: (ext/dbcheck.pl:59):      my $CHECKLIST = [ "pinlib:95:90", > main:: "blbuff:95:90", "rowcache:95:90", "tblsp:90:95", "hitcache:95:90", > main:: "rollback:90:95",
main:: (ext/dbcheck.pl:60): > main:: "session:90:95", "process:90:95", "memreq:90:95", "extent:90:95" > main:: ];  DB<1> n
main:: (ext/dbcheck.pl:63): > main:: @listahost=&Hobbit_fd_lib::get_server_to_test($TEST) if > main:: (!@listahost);  DB<1> n
main:: (ext/dbcheck.pl:64): > main:: &Hobbit_fd_lib::execute_thread(\&execute_db_test , at listahost); > main:: DB<1> n
quoted from Martin Flemming
 Thu Jul 30 08:06:27 2009:ERROR on atlast1: Timeout connecting to >  DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !
 Debugged program terminated.  Use q to quit or R to restart,
   use O inhibit_exit to avoid stopping after program termination,
   h q, h R or h O to get additional info.
 main::(ext/dbcheck.pl:65):              exit;
   DB<1>
 ... and the logfile e.g.
 Thu Jul 30 11:45:37 2009:ERROR on atlas_tag_db: Timeout connecting to >  DBI:Oracle:host=lcg3d-a-v-4   ;port=1521         ;sid=atlas_tag_db  !
 Thu Jul 30 11:45:37 2009:ERROR on atlast1: Timeout connecting to >  DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !
 Thu Jul 30 11:45:37 2009:ERROR on atlast3: Timeout connecting to >  DBI:Oracle:host=lcg3d-a-v-3  ;port=1521          ;sid=atlast3       !
 Thu Jul 30 11:45:37 2009:ERROR on atlast2: Timeout connecting to >  DBI:Oracle:host=lcg3d-a-v-2   ;port=1521          ;sid=atlast2       !
 Thu Jul 30 11:45:37 2009:ERROR on atlast4: Timeout connecting to >  DBI:Oracle:host=lcg3d-a-v-4  ;port=1521         ;sid=atlast4   !
 Any suggestions for further debugging ?
 thanks & cheers
       martin
 On Thu, 30 Jul 2009, Francesco Duranti wrote:
 Hi,
 dbcheck.pl (and the other scripts in the package) use the > >  CONFIG::IniFiles to read configuration data. CONFIG::Inifiles allow > >  comment line starting with "#" and ";" but I think it will not > >  recognize the "#" comment at the middle of a line so if you need > >  comments you should put them alone on the line before or next to the > >  line to comment on.
 On some of the sample config file I've put some comment next to > >  parameters and this could probably generate confusion. I'll change the > >  sample config file and put this behavious also in the documentation > >  I'm writing for the next version (the actual documentation is not > >  really well written and organized).
 Francesco
 On Wed, July 29, 2009 15:29, user-f286aaa49a76@xymon.invalid wrote:
 Hi !
 I want to use dbcheck.pl from
 http://sourceforge.net/projects/hobbit-perl-cl/
 .. but unfortunatley something is going wrong, i get only
 "Connection Refused" Messages and no data  .. :-(
 My config is below:
 [SNIP]
 dbcheck.ini:
 oraclehome              = /opt/products/oracle-client/10.2g/
 username                = XXXX
 password                = XXXXXXXXXXXXXXXXXXXXXXX
 [atlas_tag_db]
 dbtype                  = Oracle
 oraclerac               = yes
 hostname                = lcg3d-a-v-4   # hostname of the rac > > >  instance n.2
 sid                     = atlas_tag_db  # sid of the rac instance > > >  n.2
 port                    = 1521          # port of listener on rac > > >  instance
 I don't use this code, but your error output suggests that it's trying > >  to
 use your hostname, sid, and port from dbcheck.ini exactly as written,
 comments and all.  I don't see anything in the sample dbcheck.ini file
 that suggests that you can use trailing comments in the way that you > >  are
 doing, so perhaps you should try without those.
 
list Francesco Duranti · Wed, 9 Sep 2009 13:04:29 +0200 ·
Hi Martin,

you can try to set the variable for the oracle home into the dbcheck.ini configuration file.
oraclehome              = /usr/local/oracle/10.2.0/client/

It should point to the oracle home under which you have your client library and network/admin/tnsnames.ora file

I've also checked on the documentation on DBD::Oracle and it should be possible to have the "*.ora" file in a different location. You should set the environment variable TNS_ADMIN to the directory containing tnsnames.ora file but I've not checked if it works. If you're running the dbcheck.pl on the centrally on the xymon server you can define the environment variable in the hobbitserver.cfg or you can also define it in the startup environment variable of your xymon user so that it's defined when the dbcheck.pl script is running.

Let me know if this work for you. I'll also try to do some tests and put a new config parameters on the next version of dbcheck related to the tnsnames.ora location.
quoted from Martin Flemming

Francesco


-----Original Message-----
From: Martin Flemming [mailto:user-f286aaa49a76@xymon.invalid]
Sent: mercoledì 9 settembre 2009 11.17
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] dbcheck for RAC connections refused


Hi, again !

My setup works now for the RAC-instances ... ;-)

of course a configuration-error by me and my oracle-admin ..

But unfortunatley not for the RAC-DB ..

Indeed the message is clear

  Wed Sep 09 09:24:46 2009 Connection Check Failed

and

ORA-12154: TNS:could not resolve the connect identifier specified (DBD ERROR: OCIServerAttach)

Because, i've got an local tnsnames.ora for this RAC-Cluster .. and not our global oracle-enviroment and tnsnames.ora ...

Is there a possibility to make an variable in dbcheck.ini for the  place of the tnsnames.ora ?

thanks & cheers,

        martin


On Wed, 5 Aug 2009, Martin Flemming wrote:
Hi !
.. was some days on holiday .. ;-)

Thanks a lot for help !

.. indeed, something is going wrong, with the communication to the
rac-database ..

you see, i'm not a oracle-expert ...
i will contact my second oracle-admin and will ask him, whats going
wrong with the configuration from my first oracle-admin ...

Thanks, i will report ...

cheers,
       martin


On Fri, 31 Jul 2009, Francesco Duranti wrote:
 This is really strange.
 Regarding the RAC test it cannot be done without the tnsnames.ora
configuration.
 What's the problem regarding the tnsnames.ora? does it exists?

 The timeout problem seems also strange because it's like your client
could  not reach the database.
 You should try to connect to the oracle client (sqlplus).

 You can also try with this perl script

 #/usr/bin/perl
 use DBI;
 $ENV{'ORACLE_HOME'}="/usr/local/oracle/10.2.0/client/";
 $dbhost="hostname";
 $port=1521;
 $sid="SID";
 $user="user";
 $pw="password";
 $data_source="DBI:Oracle:host=$dbhost;port=$port;sid=$sid";
 $dbh = DBI->connect($data_source,$user,$pw ,{ RaiseError => 1,
PrintError  =>1});  $dbh->disconnect;  exit 0;

 Let me know if there's any problem...

 Francesco


 -----Original Message-----
 From: Martin Flemming [mailto:user-f286aaa49a76@xymon.invalid]
 Sent: venerdì 31 luglio 2009 0.28
 To: user-ae9b8668bcde@xymon.invalid
 Subject: RE: [hobbit] dbcheck for RAC connections refused


 Hi !

 Unfortunatley, i've got no luck till yet ...

 I've cleaned up my dbcheck.ini like this, also without any spaces ...


 # cat etc/dbcheck.ini|grep -v \#


 [default]
 warningout              = send
 conn                    = conn
 include                 =
 defaultgroup            =
 timeoutdbconn           = 20s
 timeoudbtselect         = 1h
 oraclehome              = /opt/products/oracle-client/10.2g/
 fastcheck               = 30m
 mediumcheck             = 2h
 slowcheck               = 6h
 bbdisplay               = localhost
 bbsendtype              = multi
 singlesendashost        = no
 bbconncolumn            = ChkConn::fast
 bbauditcolumn           = Audit::fast
 bbtablespacecolumn      = TblSpace::fast
 bbextentcolumn          = Extent::slow
 bbhitcachecolumn        = HitCache::fast
 bbmemreqcolumn          = MemReq::fast
 bbrollbackcolumn        = RollBack::slow
 bbinvobjcolumn          = InvObj::fast
 bblockscolumn           = Locks::fast
 bbsessioncolumn         = Session::fast
 bbsessionuserlist       = yes
 username                = XXXXXXXXXX
 password                = XXXXXXXXXXXXXXxx
 tblspcheck              = 90:95
 tblspreportautoext      = 90:95
 pinlibcheck             = 95:90
 blbuffcheck             = 95:90
 hitcachecheck           = 95:90
 rowcachecheck           = 95:90
 extentcheck             = 90:95
 rollbackcheck           = 90:95
 sessioncheck            = 90:95
 processcheck            = 90:95
 rb.SYSTEM               = 101:101
 invobjwarn              = :::
 invobjignore            =
 dbtype                  = Oracle


 [atlast1]
 hostname                = lcg3d-a-v-1
 port                    = 1521
 username                = XXXXXXXXXXX
 password                = XXXXXXXXXXXXX
 bbauditcolumn           = Audit:notest
 bbtablespacecolumn      = TblSpace:notest
 bbextentcolumn          = Extent:notest
 bbrollbackcolumn        = RollBack:notest
 bblockscolumn           = Locks:notest
 bbinvobjcolumn          = InvObj:notest


 [atlast2]
 hostname                = lcg3d-a-v-2
 port                    = 1521
 bbauditcolumn             = Audit:notest
 bbtablespacecolumn      = TblSpace:notest
 bbextentcolumn          = Extent:notest
 bbrollbackcolumn        = RollBack:notest
 bblockscolumn           = Locks:notest
 bbinvobjcolumn          = InvObj:notest
 username                = XXXXXXXXXXx
 password                = XXXXXXXXXXXXXX


 [atlast3]
 hostname                = lcg3d-a-v-3
 port                    = 1521
 bbauditcolumn             = Audit:notest
 bbtablespacecolumn      = TblSpace:notest
 bbextentcolumn          = Extent:notest
 bbrollbackcolumn        = RollBack:notest
 bblockscolumn           = Locks:notest
 bbinvobjcolumn          = InvObj:notest
 username                = XXXXXX
 password                = XXXXXXXXXX


 [atlast4]
 hostname                = lcg3d-a-v-4
 port                    = 1521
 username                = XXXXXXX
 password                = XXXXXXXXXXX
 bbauditcolumn             = Audit:notest
 bbtablespacecolumn      = TblSpace:notest
 bbextentcolumn          = Extent:notest
 bbrollbackcolumn        = RollBack:notest
 bblockscolumn           = Locks:notest
 bbinvobjcolumn          = InvObj:notest


 [atlas_tag_db]
 oraclerac               = yes
 port                    = 1521
 username                = XXXXXXXX
 password                = XXXXXXXXX
 bbhitcachecolumn        = HitCache:notest
 bbmemreqcolumn          = MemReq:notest


 The output of the test is :

 l Stats
 Test Time    = 00:00:01
 Host Checked = 5
 Status Msg   = 29

 Colors                   Colors
 clear                       24
 red                          5

 Events                   Events
 Audit                        1
 ChkConn                      5
 Extent                       1
 HitCache                     4
 InvObj                       1
 Locks                        1
 MemReq                       4
 RollBack                     1
 Session                      5
 TblSpace                     1
 uptime                       5

 Types                     Types
 status+30m                  22
 status+60                    5
 status+6h                    2

 Hosts Summary
 Hosts                     clear        red     Number      Times
 atlas_tag_db                  8          1          9   00:00:00
 atlast1                       4          1          5   00:00:00
 atlast2                       4          1          5   00:00:00
 atlast3                       4          1          5   00:00:00
 atlast4                       4          1          5   00:00:00

 Hosts Summary
 Hosts                     Audit    ChkConn     Extent   HitCache
 InvObj      Locks     MemReq   RollBack    Session   TblSpace     uptime
 atlas_tag_db                  1          1          1          0
 1          1          0          1          1          1          1
 atlast1                       0          1          0          1
 0          0          1          0          1          0          1
 atlast2                       0          1          0          1
 0          0          1          0          1          0          1
 atlast3                       0          1          0          1
 0          0          1          0          1          0          1
 atlast4                       0          1          0          1
 0          0          1          0          1          0          1

 Errors
 No General Errors
 atlas_tag_db
 Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to
DBI:Oracle:atlas_tag_db!
 atlast1
 Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to
DBI:Oracle:host=lcg3d-a-v-1;port=1521;sid=atlast1!
 atlast2
 Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to
DBI:Oracle:host=lcg3d-a-v-2;port=1521;sid=atlast2!
 atlast3
 Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to
DBI:Oracle:host=lcg3d-a-v-3;port=1521;sid=atlast3!
 atlast4
 Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to
DBI:Oracle:host=lcg3d-a-v-4;port=1521;sid=atlast4!

 Warnings
 No General Warnings

 In tnsnames.ora (under ORACLE_HOME/network/admin) I've those
 configuration:
 This is a good point, i can't use the tnsnames.ora, because my
oracle-software is placed in the global filesystem AFS ...

 So, could this be a problem, if i have to got all informations only
from  dbcheck.ini ?

 You can also try to connect with a telnet to the hostname and
listener  port

 Yep, telnet to port 1521 is working .. to  lcg3d-a-v-1/4

 here my enviroment:

 bin/bbcmd  ext/dbcheck.pl -v
 2009-07-31 00:04:28 Using default environment file
/usr/lib/hobbit/server/etc/hobbitserver.cfg
 Program Information
         dbcheck.pl version 1.09
         Hobbit_fd_lib.pm version 1.16

 OS Information
         Linux it-wgs02 2.6.9-78.0.22.ELsmp #1 SMP Thu Apr 30
23:30:54 CDT
 2009 i686 i686 i386 GNU/Linux
         Perl version is v5.8.5

 Module Information
         FindBin 1.44
         POSIX 1.08
         Text::Wrap 2001.09292
         Time::Local 1.1
         Sys::SigAction 0.04
         Config::IniFiles 2.39
         DBI 1.605
DBD:: DBM 0.03
DBD:: ExampleP 12.010007
DBD:: File 0.35
DBD:: Gofer 0.011377
DBD:: Oracle 1.23
DBD:: Proxy 0.2004
DBD:: Sponge 12.010002


 Hmm, misterious ..

        martin


 On Thu, 30 Jul 2009, Francesco Duranti wrote:
 This is what i normally do to check a RAC DB + single RAC instance
in  the configuration:

 oraclehome              = /usr/local/oracle/10.2.0/client/
 bbdisplay               = localhost
 bbconncolumn            = ChkConn::fast
 bbauditcolumn           = Audit::fast
 bbtablespacecolumn      = TblSpace::fast
 bbextentcolumn          = Extent::slow
 bbhitcachecolumn        = HitCache::fast
 bbmemreqcolumn          = MemReq::fast
 bbrollbackcolumn        = RollBack::slow
 bbinvobjcolumn          = InvObj::fast
 bblockscolumn           = Locks::fast
 bbsessioncolumn         = Session::fast
 bbsessionuserlist       = yes
 username                = userxxx
 password                = pwxxxxx

 [CL10G]
 oraclerac               = yes
 bbhitcachecolumn        = HitCache:notest
 bbmemreqcolumn          = MemReq:notest

 [CL10G1]
 hostname                = itromdb21
 bbauditcolumn           = Audit:notest
 bbtablespacecolumn      = TblSpace:notest
 bbextentcolumn          = Extent:notest
 bbrollbackcolumn        = RollBack:notest
 bblockscolumn           = Locks:notest
 bbinvobjcolumn          = InvObj:notest

 [CL10G2]
 hostname                = itromdb22
 bbauditcolumn           = Audit:notest
 bbtablespacecolumn      = TblSpace:notest
 bbextentcolumn          = Extent:notest
 bbrollbackcolumn        = RollBack:notest
 bblockscolumn           = Locks:notest
 bbinvobjcolumn          = InvObj:notest


 In tnsnames.ora (under ORACLE_HOME/network/admin) I've those
 configuration:

 CL10G =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB21)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB22)(PORT = 1521))
    (LOAD_BALANCE = no)
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = cl10g)
)
)

 CL10G2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB22)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = cl10g)
      (INSTANCE_NAME = cl10g2)
)
)

 CL10G1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB21)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = cl10g)
      (INSTANCE_NAME = cl10g1)
)
)


 With this setting I normally use the tnsnames.ora configuration
for RAC  (I was able to check RAC database only using tnsnames.ora not directly.
 You  can try to remove the hostname and port from the db
configuration  for the RAC.
 If the SID is equal to the name of the DB to check (the one in [])
you  can also remove the sid line from the configuration.

 You can also try to connect with a telnet to the hostname and
listener  port to see if it answer (or better you can configure on
the client the  tnsnames.ora and do a tnsping to see if the instances are answering).

 As you can see I don't do some checks on the RAC itselft or on the
single instances... For example I don't test memreq and hitcache on
the  RAC and I don't check TblSpace, Extent, Rollback, locks,
invalid objects  on the single instances.


 Please check also on the configuration file and remove all ending
space  after host or port or sid. I don't know if it can create
problems (I'll  check this also and remove those from the
configuration option for the  next version).


 Let me know if this work for you or you have other problems.

 Francesco


 -----Original Message-----
 From: Martin Flemming [mailto:user-f286aaa49a76@xymon.invalid]
 Sent: giovedì 30 luglio 2009 11.47
 To: user-ae9b8668bcde@xymon.invalid
 Subject: RE: [hobbit] dbcheck for RAC connections refused


 Hi, Franceso !

 Thanks for the hint, it looks better/cleaner now, but the error is
still  exist ...

 "
 /usr/lib/hobbit/server #  bin/bbcmd ext/dbcheck.pl -t atlast1
2009-07-30 08:08:28 Using default environment file
/usr/lib/hobbit/server/etc/hobbitserver.cfg
 Thu Jul 30 08:08:29 2009:ERROR on atlast1: Timeout connecting to
 DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !
 "


 [it-wgs02] /usr/lib/hobbit/server #  bin/bbcmd perl -d
ext/dbcheck.pl  -t atlast1  2009-07-30 08:05:59 Using default
environment file  /usr/lib/hobbit/server/etc/hobbitserver.cfg

 Loading DB routines from perl5db.pl version 1.27  Editor support
available.

 Enter h or `h h' for help, or `man perldebug' for more help.

 Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1222):1222:
 &load_config ;  DB<1> n
 Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1223):1223:
 &get_disabled_hosts;  DB<1> n
 Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1224):1224:
 my $pv=sprintf "%vd", $^V;  DB<1> n
 Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1225):1225:
 my $sv=$Sys::SigAction::VERSION;  DB<1> n
 Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1226):1226:
 if (($pv =~ /5\.8\.0/) && ($sv !~ /0\.09/)) {  DB<1> n
main:: (ext/dbcheck.pl:39):      my ($orahome, @listahost, $dbhost,
main:: $port, $username, $password, $dbtype,
$sid,$onlycustomcheck);
main:: DB<1> n
main:: (ext/dbcheck.pl:40):      my
main::

(%warnhash,%alerthash,$invobjignore,$invobjwarn, at invobjwlist, at invob
jilist,$checkuserlist,%customcheck);
quoted from Martin Flemming
main:: DB<1> n
main:: (ext/dbcheck.pl:41):      my
main:: ($sendtv,$singlesendas,%selcmd,$raccheck,
main:: @KeyToCheck, at CustomKeyToCheck);  DB<1> n
main:: (ext/dbcheck.pl:43):      my %DBCHECK =
main:: (main::(ext/dbcheck.pl:44):                     oracle
main:: => [
main::
"fulltest","conn","audit","tablespace","extent","hitcache","memreq"
,
main:: (ext/dbcheck.pl:45):
main:: "rollback","invobj","locks","session" ],
main:: (ext/dbcheck.pl:46):                     oracledef        => [
main::

"Database","ChkConn::fast","Audit::fast","TblSpace::fast","Extent::
slow",
quoted from Martin Flemming
main:: (ext/dbcheck.pl:47):
main:: "HitCache::fast","MemReq::fast",
"RollBack::slow","InvObj::fast",
main:: (ext/dbcheck.pl:48):
main:: "Locks::fast","Session::fast" ],
main:: (ext/dbcheck.pl:49):                     informix         => [
main:: "fulltest","conn","tablespace" ],
main:: (ext/dbcheck.pl:50):                     informixdef      => [
main:: "Database","ChkConn::fast","TblSpace::fast" ],
main:: (ext/dbcheck.pl:51):                     sqlserver        => [
main:: "fulltest","conn","tablespace" ],
main:: (ext/dbcheck.pl:52):                     sqlserverdef     => [
main:: "Database","ChkConn::fast","TblSpace::fast" ],
main:: (ext/dbcheck.pl:53):                     mysql            => [
main:: "fulltest","conn","mysqlperf" ],
main:: (ext/dbcheck.pl:54):                     mysqldef         => [
main:: "MySQL","ChkConn::fast","mysqlperf::fast" ],
main:: (ext/dbcheck.pl:55):                     db2              => [
main:: "fulltest","conn","tablespace" ],
main:: (ext/dbcheck.pl:56):                     db2def           => [
main:: "DB2","ChkConn::fast","TblSpace::fast" ],
main:: (ext/dbcheck.pl:57):                   );  DB<1> n
main:: (ext/dbcheck.pl:59):      my $CHECKLIST = [ "pinlib:95:90",
main:: "blbuff:95:90", "rowcache:95:90", "tblsp:90:95",
"hitcache:95:90",
main:: "rollback:90:95",
main:: (ext/dbcheck.pl:60):
main:: "session:90:95", "process:90:95", "memreq:90:95", "extent:90:95"
main:: ];  DB<1> n
main:: (ext/dbcheck.pl:63):
main:: @listahost=&Hobbit_fd_lib::get_server_to_test($TEST) if
main:: (!@listahost);  DB<1> n
main:: (ext/dbcheck.pl:64):
main:: &Hobbit_fd_lib::execute_thread(\&execute_db_test
, at listahost);
main:: DB<1> n
 Thu Jul 30 08:06:27 2009:ERROR on atlast1: Timeout connecting to
 DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !

 Debugged program terminated.  Use q to quit or R to restart,
   use O inhibit_exit to avoid stopping after program termination,
   h q, h R or h O to get additional info.
 main::(ext/dbcheck.pl:65):              exit;
   DB<1>

 ... and the logfile e.g.

 Thu Jul 30 11:45:37 2009:ERROR on atlas_tag_db: Timeout connecting to
 DBI:Oracle:host=lcg3d-a-v-4   ;port=1521         ;sid=atlas_tag_db  !
 Thu Jul 30 11:45:37 2009:ERROR on atlast1: Timeout connecting to
 DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !
 Thu Jul 30 11:45:37 2009:ERROR on atlast3: Timeout connecting to
 DBI:Oracle:host=lcg3d-a-v-3  ;port=1521          ;sid=atlast3       !
 Thu Jul 30 11:45:37 2009:ERROR on atlast2: Timeout connecting to
 DBI:Oracle:host=lcg3d-a-v-2   ;port=1521          ;sid=atlast2       !
 Thu Jul 30 11:45:37 2009:ERROR on atlast4: Timeout connecting to
 DBI:Oracle:host=lcg3d-a-v-4  ;port=1521         ;sid=atlast4   !


 Any suggestions for further debugging ?

 thanks & cheers

       martin


 On Thu, 30 Jul 2009, Francesco Duranti wrote:
 Hi,
 dbcheck.pl (and the other scripts in the package) use the
CONFIG::IniFiles to read configuration data. CONFIG::Inifiles
allow  comment line starting with "#" and ";" but I think it will
not  recognize the "#" comment at the middle of a line so if you
need  comments you should put them alone on the line before or
next to the  line to comment on.

 On some of the sample config file I've put some comment next to
parameters and this could probably generate confusion. I'll
change the  sample config file and put this behavious also in the
documentation  I'm writing for the next version (the actual
documentation is not  really well written and organized).


 Francesco


 On Wed, July 29, 2009 15:29, user-f286aaa49a76@xymon.invalid wrote:
 Hi !

 I want to use dbcheck.pl from

 http://sourceforge.net/projects/hobbit-perl-cl/

 .. but unfortunatley something is going wrong, i get only
"Connection Refused" Messages and no data  .. :-(

 My config is below:
 [SNIP]
 dbcheck.ini:

 oraclehome              = /opt/products/oracle-client/10.2g/
 username                = XXXX
 password                = XXXXXXXXXXXXXXXXXXXXXXX


 [atlas_tag_db]
 dbtype                  = Oracle
 oraclerac               = yes
 hostname                = lcg3d-a-v-4   # hostname of the rac
 instance n.2
 sid                     = atlas_tag_db  # sid of the rac instance
 n.2
 port                    = 1521          # port of listener on rac
 instance

 I don't use this code, but your error output suggests that it's
trying  to  use your hostname, sid, and port from dbcheck.ini
exactly as written,  comments and all.  I don't see anything in
the sample dbcheck.ini file  that suggests that you can use
trailing comments in the way that you  are  doing, so perhaps you
should try without those.

list Martin Flemming · Thu, 22 Oct 2009 18:58:01 +0200 (CEST) ·
Dear, Francesco et all !

.. long time ago ...

Please give me an hint how and where i can set the TNS_ADMIN variable ?

i'm a very bad coder :-(

.. various possible (for me) options tested, but without success :-(

thanks in advance

 	martin
quoted from Francesco Duranti

On Wed, 9 Sep 2009, Francesco Duranti wrote:
Hi Martin,

you can try to set the variable for the oracle home into the dbcheck.ini configuration file.
oraclehome              = /usr/local/oracle/10.2.0/client/

It should point to the oracle home under which you have your client library and network/admin/tnsnames.ora file

I've also checked on the documentation on DBD::Oracle and it should be possible to have the "*.ora" file in a different location. You should set the environment variable TNS_ADMIN to the directory containing tnsnames.ora file but I've not checked if it works. If you're running the dbcheck.pl on the centrally on the xymon server you can define the environment variable in the hobbitserver.cfg or you can also define it in the startup environment variable of your xymon user so that it's defined when the dbcheck.pl script is running.

Let me know if this work for you. I'll also try to do some tests and put a new config parameters on the next version of dbcheck related to the tnsnames.ora location.

Francesco


-----Original Message-----
From: Martin Flemming [mailto:user-f286aaa49a76@xymon.invalid]
Sent: mercoledì 9 settembre 2009 11.17
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] dbcheck for RAC connections refused


Hi, again !

My setup works now for the RAC-instances ... ;-)

of course a configuration-error by me and my oracle-admin ..

But unfortunatley not for the RAC-DB ..

Indeed the message is clear

 Wed Sep 09 09:24:46 2009 Connection Check Failed

and

ORA-12154: TNS:could not resolve the connect identifier specified (DBD ERROR: OCIServerAttach)

Because, i've got an local tnsnames.ora for this RAC-Cluster .. and not our global oracle-enviroment and tnsnames.ora ...

Is there a possibility to make an variable in dbcheck.ini for the  place of the tnsnames.ora ?

thanks & cheers,

       martin


On Wed, 5 Aug 2009, Martin Flemming wrote:
Hi !
.. was some days on holiday .. ;-)

Thanks a lot for help !

.. indeed, something is going wrong, with the communication to the
rac-database ..

you see, i'm not a oracle-expert ...
i will contact my second oracle-admin and will ask him, whats going
wrong with the configuration from my first oracle-admin ...

Thanks, i will report ...

cheers,
       martin


On Fri, 31 Jul 2009, Francesco Duranti wrote:
 This is really strange.
 Regarding the RAC test it cannot be done without the tnsnames.ora
configuration.
 What's the problem regarding the tnsnames.ora? does it exists?

 The timeout problem seems also strange because it's like your client
could  not reach the database.
 You should try to connect to the oracle client (sqlplus).

 You can also try with this perl script

 #/usr/bin/perl
 use DBI;
 $ENV{'ORACLE_HOME'}="/usr/local/oracle/10.2.0/client/";
 $dbhost="hostname";
 $port=1521;
 $sid="SID";
 $user="user";
 $pw="password";
 $data_source="DBI:Oracle:host=$dbhost;port=$port;sid=$sid";
 $dbh = DBI->connect($data_source,$user,$pw ,{ RaiseError => 1,
PrintError  =>1});  $dbh->disconnect;  exit 0;

 Let me know if there's any problem...

 Francesco


 -----Original Message-----
 From: Martin Flemming [mailto:user-f286aaa49a76@xymon.invalid]
 Sent: venerdì 31 luglio 2009 0.28
 To: user-ae9b8668bcde@xymon.invalid
 Subject: RE: [hobbit] dbcheck for RAC connections refused


 Hi !

 Unfortunatley, i've got no luck till yet ...

 I've cleaned up my dbcheck.ini like this, also without any spaces ...


 # cat etc/dbcheck.ini|grep -v \#


 [default]
 warningout              = send
 conn                    = conn
 include                 =
 defaultgroup            =
 timeoutdbconn           = 20s
 timeoudbtselect         = 1h
 oraclehome              = /opt/products/oracle-client/10.2g/
 fastcheck               = 30m
 mediumcheck             = 2h
 slowcheck               = 6h
 bbdisplay               = localhost
 bbsendtype              = multi
 singlesendashost        = no
 bbconncolumn            = ChkConn::fast
 bbauditcolumn           = Audit::fast
 bbtablespacecolumn      = TblSpace::fast
 bbextentcolumn          = Extent::slow
 bbhitcachecolumn        = HitCache::fast
 bbmemreqcolumn          = MemReq::fast
 bbrollbackcolumn        = RollBack::slow
 bbinvobjcolumn          = InvObj::fast
 bblockscolumn           = Locks::fast
 bbsessioncolumn         = Session::fast
 bbsessionuserlist       = yes
 username                = XXXXXXXXXX
 password                = XXXXXXXXXXXXXXxx
 tblspcheck              = 90:95
 tblspreportautoext      = 90:95
 pinlibcheck             = 95:90
 blbuffcheck             = 95:90
 hitcachecheck           = 95:90
 rowcachecheck           = 95:90
 extentcheck             = 90:95
 rollbackcheck           = 90:95
 sessioncheck            = 90:95
 processcheck            = 90:95
 rb.SYSTEM               = 101:101
 invobjwarn              = :::
 invobjignore            =
 dbtype                  = Oracle


 [atlast1]
 hostname                = lcg3d-a-v-1
 port                    = 1521
 username                = XXXXXXXXXXX
 password                = XXXXXXXXXXXXX
 bbauditcolumn           = Audit:notest
 bbtablespacecolumn      = TblSpace:notest
 bbextentcolumn          = Extent:notest
 bbrollbackcolumn        = RollBack:notest
 bblockscolumn           = Locks:notest
 bbinvobjcolumn          = InvObj:notest


 [atlast2]
 hostname                = lcg3d-a-v-2
 port                    = 1521
 bbauditcolumn             = Audit:notest
 bbtablespacecolumn      = TblSpace:notest
 bbextentcolumn          = Extent:notest
 bbrollbackcolumn        = RollBack:notest
 bblockscolumn           = Locks:notest
 bbinvobjcolumn          = InvObj:notest
 username                = XXXXXXXXXXx
 password                = XXXXXXXXXXXXXX


 [atlast3]
 hostname                = lcg3d-a-v-3
 port                    = 1521
 bbauditcolumn             = Audit:notest
 bbtablespacecolumn      = TblSpace:notest
 bbextentcolumn          = Extent:notest
 bbrollbackcolumn        = RollBack:notest
 bblockscolumn           = Locks:notest
 bbinvobjcolumn          = InvObj:notest
 username                = XXXXXX
 password                = XXXXXXXXXX


 [atlast4]
 hostname                = lcg3d-a-v-4
 port                    = 1521
 username                = XXXXXXX
 password                = XXXXXXXXXXX
 bbauditcolumn             = Audit:notest
 bbtablespacecolumn      = TblSpace:notest
 bbextentcolumn          = Extent:notest
 bbrollbackcolumn        = RollBack:notest
 bblockscolumn           = Locks:notest
 bbinvobjcolumn          = InvObj:notest


 [atlas_tag_db]
 oraclerac               = yes
 port                    = 1521
 username                = XXXXXXXX
 password                = XXXXXXXXX
 bbhitcachecolumn        = HitCache:notest
 bbmemreqcolumn          = MemReq:notest


 The output of the test is :

 l Stats
 Test Time    = 00:00:01
 Host Checked = 5
 Status Msg   = 29

 Colors                   Colors
 clear                       24
 red                          5

 Events                   Events
 Audit                        1
 ChkConn                      5
 Extent                       1
 HitCache                     4
 InvObj                       1
 Locks                        1
 MemReq                       4
 RollBack                     1
 Session                      5
 TblSpace                     1
 uptime                       5

 Types                     Types
 status+30m                  22
 status+60                    5
 status+6h                    2

 Hosts Summary
 Hosts                     clear        red     Number      Times
 atlas_tag_db                  8          1          9   00:00:00
 atlast1                       4          1          5   00:00:00
 atlast2                       4          1          5   00:00:00
 atlast3                       4          1          5   00:00:00
 atlast4                       4          1          5   00:00:00

 Hosts Summary
 Hosts                     Audit    ChkConn     Extent   HitCache
 InvObj      Locks     MemReq   RollBack    Session   TblSpace     uptime
 atlas_tag_db                  1          1          1          0
 1          1          0          1          1          1          1
 atlast1                       0          1          0          1
 0          0          1          0          1          0          1
 atlast2                       0          1          0          1
 0          0          1          0          1          0          1
 atlast3                       0          1          0          1
 0          0          1          0          1          0          1
 atlast4                       0          1          0          1
 0          0          1          0          1          0          1

 Errors
 No General Errors
 atlas_tag_db
 Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to
DBI:Oracle:atlas_tag_db!
 atlast1
 Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to
DBI:Oracle:host=lcg3d-a-v-1;port=1521;sid=atlast1!
 atlast2
 Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to
DBI:Oracle:host=lcg3d-a-v-2;port=1521;sid=atlast2!
 atlast3
 Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to
DBI:Oracle:host=lcg3d-a-v-3;port=1521;sid=atlast3!
 atlast4
 Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to
DBI:Oracle:host=lcg3d-a-v-4;port=1521;sid=atlast4!

 Warnings
 No General Warnings

 In tnsnames.ora (under ORACLE_HOME/network/admin) I've those
 configuration:
 This is a good point, i can't use the tnsnames.ora, because my
oracle-software is placed in the global filesystem AFS ...

 So, could this be a problem, if i have to got all informations only
from  dbcheck.ini ?

 You can also try to connect with a telnet to the hostname and
listener  port

 Yep, telnet to port 1521 is working .. to  lcg3d-a-v-1/4

 here my enviroment:

 bin/bbcmd  ext/dbcheck.pl -v
 2009-07-31 00:04:28 Using default environment file
/usr/lib/hobbit/server/etc/hobbitserver.cfg
 Program Information
         dbcheck.pl version 1.09
         Hobbit_fd_lib.pm version 1.16

 OS Information
         Linux it-wgs02 2.6.9-78.0.22.ELsmp #1 SMP Thu Apr 30
23:30:54 CDT
 2009 i686 i686 i386 GNU/Linux
         Perl version is v5.8.5

 Module Information
         FindBin 1.44
         POSIX 1.08
         Text::Wrap 2001.09292
         Time::Local 1.1
         Sys::SigAction 0.04
         Config::IniFiles 2.39
         DBI 1.605
DBD:: DBM 0.03
DBD:: ExampleP 12.010007
DBD:: File 0.35
DBD:: Gofer 0.011377
DBD:: Oracle 1.23
DBD:: Proxy 0.2004
DBD:: Sponge 12.010002


 Hmm, misterious ..

        martin


 On Thu, 30 Jul 2009, Francesco Duranti wrote:
 This is what i normally do to check a RAC DB + single RAC instance
in  the configuration:

 oraclehome              = /usr/local/oracle/10.2.0/client/
 bbdisplay               = localhost
 bbconncolumn            = ChkConn::fast
 bbauditcolumn           = Audit::fast
 bbtablespacecolumn      = TblSpace::fast
 bbextentcolumn          = Extent::slow
 bbhitcachecolumn        = HitCache::fast
 bbmemreqcolumn          = MemReq::fast
 bbrollbackcolumn        = RollBack::slow
 bbinvobjcolumn          = InvObj::fast
 bblockscolumn           = Locks::fast
 bbsessioncolumn         = Session::fast
 bbsessionuserlist       = yes
 username                = userxxx
 password                = pwxxxxx

 [CL10G]
 oraclerac               = yes
 bbhitcachecolumn        = HitCache:notest
 bbmemreqcolumn          = MemReq:notest

 [CL10G1]
 hostname                = itromdb21
 bbauditcolumn           = Audit:notest
 bbtablespacecolumn      = TblSpace:notest
 bbextentcolumn          = Extent:notest
 bbrollbackcolumn        = RollBack:notest
 bblockscolumn           = Locks:notest
 bbinvobjcolumn          = InvObj:notest

 [CL10G2]
 hostname                = itromdb22
 bbauditcolumn           = Audit:notest
 bbtablespacecolumn      = TblSpace:notest
 bbextentcolumn          = Extent:notest
 bbrollbackcolumn        = RollBack:notest
 bblockscolumn           = Locks:notest
 bbinvobjcolumn          = InvObj:notest


 In tnsnames.ora (under ORACLE_HOME/network/admin) I've those
 configuration:

 CL10G =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB21)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB22)(PORT = 1521))
    (LOAD_BALANCE = no)
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = cl10g)
)
)

 CL10G2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB22)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = cl10g)
      (INSTANCE_NAME = cl10g2)
)
)

 CL10G1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB21)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = cl10g)
      (INSTANCE_NAME = cl10g1)
)
)


 With this setting I normally use the tnsnames.ora configuration
for RAC  (I was able to check RAC database only using tnsnames.ora not directly.
 You  can try to remove the hostname and port from the db
configuration  for the RAC.
 If the SID is equal to the name of the DB to check (the one in [])
you  can also remove the sid line from the configuration.

 You can also try to connect with a telnet to the hostname and
listener  port to see if it answer (or better you can configure on
the client the  tnsnames.ora and do a tnsping to see if the instances are answering).

 As you can see I don't do some checks on the RAC itselft or on the
single instances... For example I don't test memreq and hitcache on
the  RAC and I don't check TblSpace, Extent, Rollback, locks,
invalid objects  on the single instances.


 Please check also on the configuration file and remove all ending
space  after host or port or sid. I don't know if it can create
problems (I'll  check this also and remove those from the
configuration option for the  next version).


 Let me know if this work for you or you have other problems.

 Francesco


 -----Original Message-----
 From: Martin Flemming [mailto:user-f286aaa49a76@xymon.invalid]
 Sent: giovedì 30 luglio 2009 11.47
 To: user-ae9b8668bcde@xymon.invalid
 Subject: RE: [hobbit] dbcheck for RAC connections refused


 Hi, Franceso !

 Thanks for the hint, it looks better/cleaner now, but the error is
still  exist ...

 "
 /usr/lib/hobbit/server #  bin/bbcmd ext/dbcheck.pl -t atlast1
2009-07-30 08:08:28 Using default environment file
/usr/lib/hobbit/server/etc/hobbitserver.cfg
 Thu Jul 30 08:08:29 2009:ERROR on atlast1: Timeout connecting to
 DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !
 "


 [it-wgs02] /usr/lib/hobbit/server #  bin/bbcmd perl -d
ext/dbcheck.pl  -t atlast1  2009-07-30 08:05:59 Using default
environment file  /usr/lib/hobbit/server/etc/hobbitserver.cfg

 Loading DB routines from perl5db.pl version 1.27  Editor support
available.

 Enter h or `h h' for help, or `man perldebug' for more help.

 Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1222):1222:
 &load_config ;  DB<1> n
 Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1223):1223:
 &get_disabled_hosts;  DB<1> n
 Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1224):1224:
 my $pv=sprintf "%vd", $^V;  DB<1> n
 Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1225):1225:
 my $sv=$Sys::SigAction::VERSION;  DB<1> n
 Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1226):1226:
 if (($pv =~ /5\.8\.0/) && ($sv !~ /0\.09/)) {  DB<1> n
main:: (ext/dbcheck.pl:39):      my ($orahome, @listahost, $dbhost,
main:: $port, $username, $password, $dbtype,
$sid,$onlycustomcheck);
main:: DB<1> n
main:: (ext/dbcheck.pl:40):      my
main::
(%warnhash,%alerthash,$invobjignore,$invobjwarn, at invobjwlist, at invob
jilist,$checkuserlist,%customcheck);
main:: DB<1> n
main:: (ext/dbcheck.pl:41):      my
main:: ($sendtv,$singlesendas,%selcmd,$raccheck,
main:: @KeyToCheck, at CustomKeyToCheck);  DB<1> n
main:: (ext/dbcheck.pl:43):      my %DBCHECK =
main:: (main::(ext/dbcheck.pl:44):                     oracle
main:: => [
main::
"fulltest","conn","audit","tablespace","extent","hitcache","memreq"
,
main:: (ext/dbcheck.pl:45):
main:: "rollback","invobj","locks","session" ],
main:: (ext/dbcheck.pl:46):                     oracledef        => [
main::
"Database","ChkConn::fast","Audit::fast","TblSpace::fast","Extent::
slow",
main:: (ext/dbcheck.pl:47):
main:: "HitCache::fast","MemReq::fast",
"RollBack::slow","InvObj::fast",
main:: (ext/dbcheck.pl:48):
main:: "Locks::fast","Session::fast" ],
main:: (ext/dbcheck.pl:49):                     informix         => [
main:: "fulltest","conn","tablespace" ],
main:: (ext/dbcheck.pl:50):                     informixdef      => [
main:: "Database","ChkConn::fast","TblSpace::fast" ],
main:: (ext/dbcheck.pl:51):                     sqlserver        => [
main:: "fulltest","conn","tablespace" ],
main:: (ext/dbcheck.pl:52):                     sqlserverdef     => [
main:: "Database","ChkConn::fast","TblSpace::fast" ],
main:: (ext/dbcheck.pl:53):                     mysql            => [
main:: "fulltest","conn","mysqlperf" ],
main:: (ext/dbcheck.pl:54):                     mysqldef         => [
main:: "MySQL","ChkConn::fast","mysqlperf::fast" ],
main:: (ext/dbcheck.pl:55):                     db2              => [
main:: "fulltest","conn","tablespace" ],
main:: (ext/dbcheck.pl:56):                     db2def           => [
main:: "DB2","ChkConn::fast","TblSpace::fast" ],
main:: (ext/dbcheck.pl:57):                   );  DB<1> n
main:: (ext/dbcheck.pl:59):      my $CHECKLIST = [ "pinlib:95:90",
main:: "blbuff:95:90", "rowcache:95:90", "tblsp:90:95",
"hitcache:95:90",
main:: "rollback:90:95",
main:: (ext/dbcheck.pl:60):
main:: "session:90:95", "process:90:95", "memreq:90:95", "extent:90:95"
main:: ];  DB<1> n
main:: (ext/dbcheck.pl:63):
main:: @listahost=&Hobbit_fd_lib::get_server_to_test($TEST) if
main:: (!@listahost);  DB<1> n
main:: (ext/dbcheck.pl:64):
main:: &Hobbit_fd_lib::execute_thread(\&execute_db_test
, at listahost);
main:: DB<1> n
 Thu Jul 30 08:06:27 2009:ERROR on atlast1: Timeout connecting to
 DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !

 Debugged program terminated.  Use q to quit or R to restart,
   use O inhibit_exit to avoid stopping after program termination,
   h q, h R or h O to get additional info.
 main::(ext/dbcheck.pl:65):              exit;
   DB<1>

 ... and the logfile e.g.

 Thu Jul 30 11:45:37 2009:ERROR on atlas_tag_db: Timeout connecting to
 DBI:Oracle:host=lcg3d-a-v-4   ;port=1521         ;sid=atlas_tag_db  !
 Thu Jul 30 11:45:37 2009:ERROR on atlast1: Timeout connecting to
 DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !
 Thu Jul 30 11:45:37 2009:ERROR on atlast3: Timeout connecting to
 DBI:Oracle:host=lcg3d-a-v-3  ;port=1521          ;sid=atlast3       !
 Thu Jul 30 11:45:37 2009:ERROR on atlast2: Timeout connecting to
 DBI:Oracle:host=lcg3d-a-v-2   ;port=1521          ;sid=atlast2       !
 Thu Jul 30 11:45:37 2009:ERROR on atlast4: Timeout connecting to
 DBI:Oracle:host=lcg3d-a-v-4  ;port=1521         ;sid=atlast4   !


 Any suggestions for further debugging ?

 thanks & cheers

       martin


 On Thu, 30 Jul 2009, Francesco Duranti wrote:
 Hi,
 dbcheck.pl (and the other scripts in the package) use the
CONFIG::IniFiles to read configuration data. CONFIG::Inifiles
allow  comment line starting with "#" and ";" but I think it will
not  recognize the "#" comment at the middle of a line so if you
need  comments you should put them alone on the line before or
next to the  line to comment on.

 On some of the sample config file I've put some comment next to
parameters and this could probably generate confusion. I'll
change the  sample config file and put this behavious also in the
documentation  I'm writing for the next version (the actual
documentation is not  really well written and organized).


 Francesco


 On Wed, July 29, 2009 15:29, user-f286aaa49a76@xymon.invalid wrote:
 Hi !

 I want to use dbcheck.pl from

 http://sourceforge.net/projects/hobbit-perl-cl/

 .. but unfortunatley something is going wrong, i get only
"Connection Refused" Messages and no data  .. :-(

 My config is below:
 [SNIP]
 dbcheck.ini:

 oraclehome              = /opt/products/oracle-client/10.2g/
 username                = XXXX
 password                = XXXXXXXXXXXXXXXXXXXXXXX


 [atlas_tag_db]
 dbtype                  = Oracle
 oraclerac               = yes
 hostname                = lcg3d-a-v-4   # hostname of the rac
 instance n.2
 sid                     = atlas_tag_db  # sid of the rac instance
 n.2
 port                    = 1521          # port of listener on rac
 instance

 I don't use this code, but your error output suggests that it's
trying  to  use your hostname, sid, and port from dbcheck.ini
exactly as written,  comments and all.  I don't see anything in
the sample dbcheck.ini file  that suggests that you can use
trailing comments in the way that you  are  doing, so perhaps you
should try without those.

list Francesco Duranti · Mon, 26 Oct 2009 10:15:46 +0100 ·
Hi Martin,
if you run the dbcheck.pl script from your xymon server you can put the environment directly in the the server/etc/hobbitserver.cfg
if you run it on a client it should be put in the client/etc/hobbitclient.cfg


You can also check the db connectivity before running the script in this way...
With the xymon user define the ORACLE_HOME, ORACLE_SID, TNS_ADMIN environment variable and try to run sqlplus and connect with it.
If it works also dbcheck should work.
To do a real test now you can run dbcheck.pl manually.

The minimum options required in dbcheck.ini are:

[racinstance]
oraclerac=yes
dbtype=oracle
sid=racsid


Not knowing hostname it should use oracle library and tnsnames to reach the database.
Let me know if it works or you have problems...
quoted from Martin Flemming

Francesco


-----Original Message-----
From: Martin Flemming [mailto:user-f286aaa49a76@xymon.invalid]
Sent: giovedì 22 ottobre 2009 18.58
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] dbcheck for RAC connections refused


Dear, Francesco et all !

.. long time ago ...

Please give me an hint how and where i can set the TNS_ADMIN variable ?

i'm a very bad coder :-(

.. various possible (for me) options tested, but without success :-(

thanks in advance

        martin

On Wed, 9 Sep 2009, Francesco Duranti wrote:
Hi Martin,

you can try to set the variable for the oracle home into the dbcheck.ini configuration file.
oraclehome              = /usr/local/oracle/10.2.0/client/

It should point to the oracle home under which you have your client
library and network/admin/tnsnames.ora file

I've also checked on the documentation on DBD::Oracle and it should be possible to have the "*.ora" file in a different location. You should set the environment variable TNS_ADMIN to the directory containing tnsnames.ora file but I've not checked if it works. If you're running the dbcheck.pl on the centrally on the xymon server you can define the environment variable in the hobbitserver.cfg or you can also define it in the startup environment variable of your xymon user so that it's defined when the dbcheck.pl script is running.

Let me know if this work for you. I'll also try to do some tests and put a new config parameters on the next version of dbcheck related to the tnsnames.ora location.

Francesco


-----Original Message-----
From: Martin Flemming [mailto:user-f286aaa49a76@xymon.invalid]
Sent: mercoledì 9 settembre 2009 11.17
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] dbcheck for RAC connections refused


Hi, again !

My setup works now for the RAC-instances ... ;-)

of course a configuration-error by me and my oracle-admin ..

But unfortunatley not for the RAC-DB ..

Indeed the message is clear

 Wed Sep 09 09:24:46 2009 Connection Check Failed

and

ORA-12154: TNS:could not resolve the connect identifier specified (DBD
ERROR: OCIServerAttach)

Because, i've got an local tnsnames.ora for this RAC-Cluster .. and not our global oracle-enviroment and tnsnames.ora ...

Is there a possibility to make an variable in dbcheck.ini for the  place of the tnsnames.ora ?

thanks & cheers,

       martin


On Wed, 5 Aug 2009, Martin Flemming wrote:
Hi !
.. was some days on holiday .. ;-)

Thanks a lot for help !

.. indeed, something is going wrong, with the communication to the
rac-database ..

you see, i'm not a oracle-expert ...
i will contact my second oracle-admin and will ask him, whats going
wrong with the configuration from my first oracle-admin ...

Thanks, i will report ...

cheers,
       martin


On Fri, 31 Jul 2009, Francesco Duranti wrote:
 This is really strange.
 Regarding the RAC test it cannot be done without the tnsnames.ora
configuration.
 What's the problem regarding the tnsnames.ora? does it exists?

 The timeout problem seems also strange because it's like your
client could  not reach the database.
 You should try to connect to the oracle client (sqlplus).

 You can also try with this perl script

 #/usr/bin/perl
 use DBI;
 $ENV{'ORACLE_HOME'}="/usr/local/oracle/10.2.0/client/";
 $dbhost="hostname";
 $port=1521;
 $sid="SID";
 $user="user";
 $pw="password";
 $data_source="DBI:Oracle:host=$dbhost;port=$port;sid=$sid";
 $dbh = DBI->connect($data_source,$user,$pw ,{ RaiseError => 1,
PrintError  =>1});  $dbh->disconnect;  exit 0;

 Let me know if there's any problem...

 Francesco


 -----Original Message-----
 From: Martin Flemming [mailto:user-f286aaa49a76@xymon.invalid]
 Sent: venerdì 31 luglio 2009 0.28
 To: user-ae9b8668bcde@xymon.invalid
 Subject: RE: [hobbit] dbcheck for RAC connections refused


 Hi !

 Unfortunatley, i've got no luck till yet ...

 I've cleaned up my dbcheck.ini like this, also without any spaces ...


 # cat etc/dbcheck.ini|grep -v \#


 [default]
 warningout              = send
 conn                    = conn
 include                 =
 defaultgroup            =
 timeoutdbconn           = 20s
 timeoudbtselect         = 1h
 oraclehome              = /opt/products/oracle-client/10.2g/
 fastcheck               = 30m
 mediumcheck             = 2h
 slowcheck               = 6h
 bbdisplay               = localhost
 bbsendtype              = multi
 singlesendashost        = no
 bbconncolumn            = ChkConn::fast
 bbauditcolumn           = Audit::fast
 bbtablespacecolumn      = TblSpace::fast
 bbextentcolumn          = Extent::slow
 bbhitcachecolumn        = HitCache::fast
 bbmemreqcolumn          = MemReq::fast
 bbrollbackcolumn        = RollBack::slow
 bbinvobjcolumn          = InvObj::fast
 bblockscolumn           = Locks::fast
 bbsessioncolumn         = Session::fast
 bbsessionuserlist       = yes
 username                = XXXXXXXXXX
 password                = XXXXXXXXXXXXXXxx
 tblspcheck              = 90:95
 tblspreportautoext      = 90:95
 pinlibcheck             = 95:90
 blbuffcheck             = 95:90
 hitcachecheck           = 95:90
 rowcachecheck           = 95:90
 extentcheck             = 90:95
 rollbackcheck           = 90:95
 sessioncheck            = 90:95
 processcheck            = 90:95
 rb.SYSTEM               = 101:101
 invobjwarn              = :::
 invobjignore            =
 dbtype                  = Oracle


 [atlast1]
 hostname                = lcg3d-a-v-1
 port                    = 1521
 username                = XXXXXXXXXXX
 password                = XXXXXXXXXXXXX
 bbauditcolumn           = Audit:notest
 bbtablespacecolumn      = TblSpace:notest
 bbextentcolumn          = Extent:notest
 bbrollbackcolumn        = RollBack:notest
 bblockscolumn           = Locks:notest
 bbinvobjcolumn          = InvObj:notest


 [atlast2]
 hostname                = lcg3d-a-v-2
 port                    = 1521
 bbauditcolumn             = Audit:notest
 bbtablespacecolumn      = TblSpace:notest
 bbextentcolumn          = Extent:notest
 bbrollbackcolumn        = RollBack:notest
 bblockscolumn           = Locks:notest
 bbinvobjcolumn          = InvObj:notest
 username                = XXXXXXXXXXx
 password                = XXXXXXXXXXXXXX


 [atlast3]
 hostname                = lcg3d-a-v-3
 port                    = 1521
 bbauditcolumn             = Audit:notest
 bbtablespacecolumn      = TblSpace:notest
 bbextentcolumn          = Extent:notest
 bbrollbackcolumn        = RollBack:notest
 bblockscolumn           = Locks:notest
 bbinvobjcolumn          = InvObj:notest
 username                = XXXXXX
 password                = XXXXXXXXXX


 [atlast4]
 hostname                = lcg3d-a-v-4
 port                    = 1521
 username                = XXXXXXX
 password                = XXXXXXXXXXX
 bbauditcolumn             = Audit:notest
 bbtablespacecolumn      = TblSpace:notest
 bbextentcolumn          = Extent:notest
 bbrollbackcolumn        = RollBack:notest
 bblockscolumn           = Locks:notest
 bbinvobjcolumn          = InvObj:notest


 [atlas_tag_db]
 oraclerac               = yes
 port                    = 1521
 username                = XXXXXXXX
 password                = XXXXXXXXX
 bbhitcachecolumn        = HitCache:notest
 bbmemreqcolumn          = MemReq:notest


 The output of the test is :

 l Stats
 Test Time    = 00:00:01
 Host Checked = 5
 Status Msg   = 29

 Colors                   Colors
 clear                       24
 red                          5

 Events                   Events
 Audit                        1
 ChkConn                      5
 Extent                       1
 HitCache                     4
 InvObj                       1
 Locks                        1
 MemReq                       4
 RollBack                     1
 Session                      5
 TblSpace                     1
 uptime                       5

 Types                     Types
 status+30m                  22
 status+60                    5
 status+6h                    2

 Hosts Summary
 Hosts                     clear        red     Number      Times
 atlas_tag_db                  8          1          9   00:00:00
 atlast1                       4          1          5   00:00:00
 atlast2                       4          1          5   00:00:00
 atlast3                       4          1          5   00:00:00
 atlast4                       4          1          5   00:00:00

 Hosts Summary
 Hosts                     Audit    ChkConn     Extent   HitCache
 InvObj      Locks     MemReq   RollBack    Session   TblSpace     uptime
 atlas_tag_db                  1          1          1          0
 1          1          0          1          1          1          1
 atlast1                       0          1          0          1
 0          0          1          0          1          0          1
 atlast2                       0          1          0          1
 0          0          1          0          1          0          1
 atlast3                       0          1          0          1
 0          0          1          0          1          0          1
 atlast4                       0          1          0          1
 0          0          1          0          1          0          1

 Errors
 No General Errors
 atlas_tag_db
 Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to
DBI:Oracle:atlas_tag_db!
 atlast1
 Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to
DBI:Oracle:host=lcg3d-a-v-1;port=1521;sid=atlast1!
 atlast2
 Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to
DBI:Oracle:host=lcg3d-a-v-2;port=1521;sid=atlast2!
 atlast3
 Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to
DBI:Oracle:host=lcg3d-a-v-3;port=1521;sid=atlast3!
 atlast4
 Fri Jul 31 00:02:15 2009:ERROR: Timeout connecting to
DBI:Oracle:host=lcg3d-a-v-4;port=1521;sid=atlast4!

 Warnings
 No General Warnings

 In tnsnames.ora (under ORACLE_HOME/network/admin) I've those
 configuration:
 This is a good point, i can't use the tnsnames.ora, because my
oracle-software is placed in the global filesystem AFS ...

 So, could this be a problem, if i have to got all informations only
from  dbcheck.ini ?

 You can also try to connect with a telnet to the hostname and
listener  port

 Yep, telnet to port 1521 is working .. to  lcg3d-a-v-1/4

 here my enviroment:

 bin/bbcmd  ext/dbcheck.pl -v
 2009-07-31 00:04:28 Using default environment file
/usr/lib/hobbit/server/etc/hobbitserver.cfg
 Program Information
         dbcheck.pl version 1.09
         Hobbit_fd_lib.pm version 1.16

 OS Information
         Linux it-wgs02 2.6.9-78.0.22.ELsmp #1 SMP Thu Apr 30
23:30:54 CDT
 2009 i686 i686 i386 GNU/Linux
         Perl version is v5.8.5

 Module Information
         FindBin 1.44
         POSIX 1.08
         Text::Wrap 2001.09292
         Time::Local 1.1
         Sys::SigAction 0.04
         Config::IniFiles 2.39
         DBI 1.605
DBD:: DBM 0.03
DBD:: ExampleP 12.010007
DBD:: File 0.35
DBD:: Gofer 0.011377
DBD:: Oracle 1.23
DBD:: Proxy 0.2004
DBD:: Sponge 12.010002


 Hmm, misterious ..

        martin


 On Thu, 30 Jul 2009, Francesco Duranti wrote:
 This is what i normally do to check a RAC DB + single RAC instance
in  the configuration:

 oraclehome              = /usr/local/oracle/10.2.0/client/
 bbdisplay               = localhost
 bbconncolumn            = ChkConn::fast
 bbauditcolumn           = Audit::fast
 bbtablespacecolumn      = TblSpace::fast
 bbextentcolumn          = Extent::slow
 bbhitcachecolumn        = HitCache::fast
 bbmemreqcolumn          = MemReq::fast
 bbrollbackcolumn        = RollBack::slow
 bbinvobjcolumn          = InvObj::fast
 bblockscolumn           = Locks::fast
 bbsessioncolumn         = Session::fast
 bbsessionuserlist       = yes
 username                = userxxx
 password                = pwxxxxx

 [CL10G]
 oraclerac               = yes
 bbhitcachecolumn        = HitCache:notest
 bbmemreqcolumn          = MemReq:notest

 [CL10G1]
 hostname                = itromdb21
 bbauditcolumn           = Audit:notest
 bbtablespacecolumn      = TblSpace:notest
 bbextentcolumn          = Extent:notest
 bbrollbackcolumn        = RollBack:notest
 bblockscolumn           = Locks:notest
 bbinvobjcolumn          = InvObj:notest

 [CL10G2]
 hostname                = itromdb22
 bbauditcolumn           = Audit:notest
 bbtablespacecolumn      = TblSpace:notest
 bbextentcolumn          = Extent:notest
 bbrollbackcolumn        = RollBack:notest
 bblockscolumn           = Locks:notest
 bbinvobjcolumn          = InvObj:notest


 In tnsnames.ora (under ORACLE_HOME/network/admin) I've those
 configuration:

 CL10G =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB21)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB22)(PORT = 1521))
    (LOAD_BALANCE = no)
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = cl10g)
)
)

 CL10G2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB22)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = cl10g)
      (INSTANCE_NAME = cl10g2)
)
)

 CL10G1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ITROMDB21)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = cl10g)
      (INSTANCE_NAME = cl10g1)
)
)


 With this setting I normally use the tnsnames.ora configuration
for RAC  (I was able to check RAC database only using tnsnames.ora not directly.
 You  can try to remove the hostname and port from the db
configuration  for the RAC.
 If the SID is equal to the name of the DB to check (the one in [])
you  can also remove the sid line from the configuration.

 You can also try to connect with a telnet to the hostname and
listener  port to see if it answer (or better you can configure on
the client the  tnsnames.ora and do a tnsping to see if the instances are answering).

 As you can see I don't do some checks on the RAC itselft or on the
single instances... For example I don't test memreq and hitcache on
the  RAC and I don't check TblSpace, Extent, Rollback, locks,
invalid objects  on the single instances.


 Please check also on the configuration file and remove all ending
space  after host or port or sid. I don't know if it can create
problems (I'll  check this also and remove those from the
configuration option for the  next version).


 Let me know if this work for you or you have other problems.

 Francesco


 -----Original Message-----
 From: Martin Flemming [mailto:user-f286aaa49a76@xymon.invalid]
 Sent: giovedì 30 luglio 2009 11.47
 To: user-ae9b8668bcde@xymon.invalid
 Subject: RE: [hobbit] dbcheck for RAC connections refused


 Hi, Franceso !

 Thanks for the hint, it looks better/cleaner now, but the error is
still  exist ...

 "
 /usr/lib/hobbit/server #  bin/bbcmd ext/dbcheck.pl -t atlast1
2009-07-30 08:08:28 Using default environment file
/usr/lib/hobbit/server/etc/hobbitserver.cfg
 Thu Jul 30 08:08:29 2009:ERROR on atlast1: Timeout connecting to
 DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !
 "


 [it-wgs02] /usr/lib/hobbit/server #  bin/bbcmd perl -d
ext/dbcheck.pl  -t atlast1  2009-07-30 08:05:59 Using default
environment file  /usr/lib/hobbit/server/etc/hobbitserver.cfg

 Loading DB routines from perl5db.pl version 1.27  Editor support
available.

 Enter h or `h h' for help, or `man perldebug' for more help.

 Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1222):1222:
 &load_config ;  DB<1> n
 Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1223):1223:
 &get_disabled_hosts;  DB<1> n
 Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1224):1224:
 my $pv=sprintf "%vd", $^V;  DB<1> n
 Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1225):1225:
 my $sv=$Sys::SigAction::VERSION;  DB<1> n
 Hobbit_fd_lib::CODE(0x9505830)(/usr/lib/hobbit/server/ext/Hobbit_fd_lib.pm:1226):1226:
 if (($pv =~ /5\.8\.0/) && ($sv !~ /0\.09/)) {  DB<1> n
main:: (ext/dbcheck.pl:39):      my ($orahome, @listahost, $dbhost,
main:: $port, $username, $password, $dbtype,
$sid,$onlycustomcheck);
main:: DB<1> n
main:: (ext/dbcheck.pl:40):      my
main::
(%warnhash,%alerthash,$invobjignore,$invobjwarn, at invobjwlist, at invob
jilist,$checkuserlist,%customcheck);
main:: DB<1> n
main:: (ext/dbcheck.pl:41):      my
main:: ($sendtv,$singlesendas,%selcmd,$raccheck,
main:: @KeyToCheck, at CustomKeyToCheck);  DB<1> n
main:: (ext/dbcheck.pl:43):      my %DBCHECK =
main:: (main::(ext/dbcheck.pl:44):                     oracle
main:: => [
main::
"fulltest","conn","audit","tablespace","extent","hitcache","memreq"
,
main:: (ext/dbcheck.pl:45):
main:: "rollback","invobj","locks","session" ],
main:: (ext/dbcheck.pl:46):                     oracledef        => [
main::
"Database","ChkConn::fast","Audit::fast","TblSpace::fast","Extent::
slow",
main:: (ext/dbcheck.pl:47):
main:: "HitCache::fast","MemReq::fast",
"RollBack::slow","InvObj::fast",
main:: (ext/dbcheck.pl:48):
main:: "Locks::fast","Session::fast" ],
main:: (ext/dbcheck.pl:49):                     informix         => [
main:: "fulltest","conn","tablespace" ],
main:: (ext/dbcheck.pl:50):                     informixdef      => [
main:: "Database","ChkConn::fast","TblSpace::fast" ],
main:: (ext/dbcheck.pl:51):                     sqlserver        => [
main:: "fulltest","conn","tablespace" ],
main:: (ext/dbcheck.pl:52):                     sqlserverdef     => [
main:: "Database","ChkConn::fast","TblSpace::fast" ],
main:: (ext/dbcheck.pl:53):                     mysql            => [
main:: "fulltest","conn","mysqlperf" ],
main:: (ext/dbcheck.pl:54):                     mysqldef         => [
main:: "MySQL","ChkConn::fast","mysqlperf::fast" ],
main:: (ext/dbcheck.pl:55):                     db2              => [
main:: "fulltest","conn","tablespace" ],
main:: (ext/dbcheck.pl:56):                     db2def           => [
main:: "DB2","ChkConn::fast","TblSpace::fast" ],
main:: (ext/dbcheck.pl:57):                   );  DB<1> n
main:: (ext/dbcheck.pl:59):      my $CHECKLIST = [ "pinlib:95:90",
main:: "blbuff:95:90", "rowcache:95:90", "tblsp:90:95",
"hitcache:95:90",
main:: "rollback:90:95",
main:: (ext/dbcheck.pl:60):
main:: "session:90:95", "process:90:95", "memreq:90:95", "extent:90:95"
main:: ];  DB<1> n
main:: (ext/dbcheck.pl:63):
main:: @listahost=&Hobbit_fd_lib::get_server_to_test($TEST) if
main:: (!@listahost);  DB<1> n
main:: (ext/dbcheck.pl:64):
main:: &Hobbit_fd_lib::execute_thread(\&execute_db_test
, at listahost);
main:: DB<1> n
 Thu Jul 30 08:06:27 2009:ERROR on atlast1: Timeout connecting to
 DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !

 Debugged program terminated.  Use q to quit or R to restart,
   use O inhibit_exit to avoid stopping after program termination,
   h q, h R or h O to get additional info.
 main::(ext/dbcheck.pl:65):              exit;
   DB<1>

 ... and the logfile e.g.

 Thu Jul 30 11:45:37 2009:ERROR on atlas_tag_db: Timeout connecting to
 DBI:Oracle:host=lcg3d-a-v-4   ;port=1521         ;sid=atlas_tag_db  !
 Thu Jul 30 11:45:37 2009:ERROR on atlast1: Timeout connecting to
 DBI:Oracle:host=lcg3d-a-v-1   ;port=1521          ;sid=atlast1      !
 Thu Jul 30 11:45:37 2009:ERROR on atlast3: Timeout connecting to
 DBI:Oracle:host=lcg3d-a-v-3  ;port=1521          ;sid=atlast3       !
 Thu Jul 30 11:45:37 2009:ERROR on atlast2: Timeout connecting to
 DBI:Oracle:host=lcg3d-a-v-2   ;port=1521          ;sid=atlast2       !
 Thu Jul 30 11:45:37 2009:ERROR on atlast4: Timeout connecting to
 DBI:Oracle:host=lcg3d-a-v-4  ;port=1521         ;sid=atlast4   !


 Any suggestions for further debugging ?

 thanks & cheers

       martin


 On Thu, 30 Jul 2009, Francesco Duranti wrote:
 Hi,
 dbcheck.pl (and the other scripts in the package) use the
CONFIG::IniFiles to read configuration data. CONFIG::Inifiles
allow  comment line starting with "#" and ";" but I think it will
not  recognize the "#" comment at the middle of a line so if you
need  comments you should put them alone on the line before or
next to the  line to comment on.

 On some of the sample config file I've put some comment next to
parameters and this could probably generate confusion. I'll change
the  sample config file and put this behavious also in the
documentation  I'm writing for the next version (the actual
documentation is not  really well written and organized).


 Francesco


 On Wed, July 29, 2009 15:29, user-f286aaa49a76@xymon.invalid wrote:
 Hi !

 I want to use dbcheck.pl from

 http://sourceforge.net/projects/hobbit-perl-cl/

 .. but unfortunatley something is going wrong, i get only
"Connection Refused" Messages and no data  .. :-(

 My config is below:
 [SNIP]
 dbcheck.ini:

 oraclehome              = /opt/products/oracle-client/10.2g/
 username                = XXXX
 password                = XXXXXXXXXXXXXXXXXXXXXXX


 [atlas_tag_db]
 dbtype                  = Oracle
 oraclerac               = yes
 hostname                = lcg3d-a-v-4   # hostname of the rac
 instance n.2
 sid                     = atlas_tag_db  # sid of the rac instance
 n.2
 port                    = 1521          # port of listener on rac
 instance

 I don't use this code, but your error output suggests that it's
trying  to  use your hostname, sid, and port from dbcheck.ini
exactly as written,  comments and all.  I don't see anything in
the sample dbcheck.ini file  that suggests that you can use
trailing comments in the way that you  are  doing, so perhaps you
should try without those.