[Nagiosplug-devel] [ nagiosplug-Bugs-808276 ] check_oracle --login fails

SourceForge.net noreply at sourceforge.net
Thu Sep 18 10:38:03 CEST 2003


Bugs item #808276, was opened at 2003-09-17 17:12
Message generated for change (Comment added) made by jhmartin
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=808276&group_id=29880

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jason Martin (jhmartin)
Assigned to: Ton Voon (tonvoon)
Summary: check_oracle --login fails

Initial Comment:
When the check_oracle plugin attempts the --login 

process (a dummy login), it redirects </dev/null into 

sqlplus. If SQLPLUS fails to login, it'll 'ask' 2 more times 

but just skip them due to the </dev/null. Instead, the -L 

option should be passed to SQLPLUS as that directs it to 

only try to login once. When -L is passed, sqlplus will 

correctly return a '1' when the login failed.

----------------------------------------------------------------------

>Comment By: Jason Martin (jhmartin)
Date: 2003-09-18 09:37

Message:
Logged In: YES 
user_id=589094

Well, the problem is that I just finished installing 9.2.0,

and I ran the --login check, and it said it was ok. Since I

hadn't created a dummy login yet, I tried the same login via

sqlplus and failed to log in. Then I tried it with

</dev/null and looked at the return code, it was 0. Then I

tried it with -L and </dev/null, and got a '1' returncode. I

realize </dev/null is required.  The 'bug' here is that

check_oracle --login said 'success' when in fact it failed.

----------------------------------------------------------------------

Comment By: Ton Voon (tonvoon)
Date: 2003-09-18 00:19

Message:
Logged In: YES 
user_id=664364

Jason,



I'm not sure what you are trying to do. The idea with the --

login is to do a dummy login to sqlplus. The plugin is 

expecting sqlplus to return "ORA-01017: invalid 

username/password". This means that the plugin has 

managed to communicate with the database and the 

database (rightly) rejects the login. If the database was not 

running, then a different error would appear and then the 

plugin would return with a critical error.



The < /dev/null is required otherwise if you run check_oracle 

on the command line sqlplus will wait for a response.



Does this answer your query?



Ton

----------------------------------------------------------------------

Comment By: Jason Martin (jhmartin)
Date: 2003-09-17 17:14

Message:
Logged In: YES 
user_id=589094

Actually, instead  of parsing the output of sqlplus it should 

check the returncode.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=808276&group_id=29880




More information about the Devel mailing list