Oracle test without oracle client

Hari Sekhon hpsekhon at googlemail.com
Mon Sep 24 11:49:18 CEST 2007


Not a good idea.

You can use check_tcp to see if the oracle listener port is open, but 
all this tells you is that the listener is up, it doesn't tell you that 
the oracle database is up and usable.

I recommend that you use check_oracle and get the oracle instant client 
that this plugin depends on.

It will then tell you if you oracle box is broken and what ORA error 
messages there are.

check_tcp is the weakest check and should be avoided unless there is no 
alternative.

-h

Hari Sekhon



riky.none wrote:
> is possible check Oracle listening service  using telnet??
>
> root at nagios:/usr/lib/nagios/plugins# telnet 10.0.2.122 1521
> Trying 10.0.2.122...
> Connected to 10.0.2.122.
> Escape character is '^]'.
>
> I think that one multipurpose script that using telnet is god idea
>
> i find one script in perl but i know perl (i dont know c, bash, php 
> pyton ecc ecc ecc)
>
>
>
>
> #!/usr/bin/perl -w
> use strict;
>
> use utils qw(%ERRORS $TIMEOUT);
>
> # in case we just hang -
> $SIG{ALRM} = sub {
> print "CRITICAL: Plugin timed out.\n";
> exit 2
> };
>
> alarm(10);
>
> my ($host, $key, $remote) = (at)ARGV;
> unless ($host and $key and $remote) {
> die "Usage: $0 hostname ssh_key remote_mail_server\n";
> }
>
> # default error
> # my $connect_result = "Remote Test Failure";
>
> open (SSH, "ssh -i $key $host telnet $remote 25|") or die "Can't open pipe:
> $!";
>
> # iterate through the loop and skip lines that don't have what we want.
> then, store the last var - we know the telnet action is 4 lines
> while (<SSH>){
> next if /^Trying/;
> next if /^Connected/;
> next if /^Escape/;
> if ($_ =~ /^220/) {
> print "$_ this works";
> exit($ERRORS{'OK'});
> }
> else {
> print "Connect died at: $_";
> exit($ERRORS{'CRITICAL'});
> }
> close SSH;
> }
> print "fell thru";
> exit($ERRORS{'WARNING'});
> close SSH;
>
> i modify the script isolating the cycle while and not using paramiter 
> but not work
> open (CONNECTION, "telnet 10.0.2.122 1521  |") or die "Can't open pipe:
>
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null
>
>   

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list