Author: fapeeler Date: Thu Dec 18 06:50:44 2008 New Revision: 727730 URL: http://svn.apache.org/viewvc?rev=727730&view=rev Log: check_ssh - removed check_ssh binary - this was a nagios plugin that was being used to simply check for ssh running on the remote node. one less dependency.
utils:check_ssh routine - replaced check_ssh call with nmap call Removed: incubator/vcl/trunk/managementnode/tools/check_ssh Modified: incubator/vcl/trunk/managementnode/lib/VCL/utils.pm Modified: incubator/vcl/trunk/managementnode/lib/VCL/utils.pm URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/utils.pm?rev=727730&r1=727729&r2=727730&view=diff ============================================================================== --- incubator/vcl/trunk/managementnode/lib/VCL/utils.pm (original) +++ incubator/vcl/trunk/managementnode/lib/VCL/utils.pm Thu Dec 18 06:50:44 2008 @@ -2737,24 +2737,17 @@ if (!defined($port)) { $port = 22; } - if (open(CHECKSSH, "$TOOLS/check_ssh -t 5 -p $port -H $node 2>&1 |")) { - my @ssh = <CHECKSSH>; - close(CHECKSSH); - foreach my $l (@ssh) { - if ($l =~ /SSH OK/) { - chomp($l); - notify($ERRORS{'OK'}, $log, " $node check_ssh module $l"); - return 1; - } - if ($l =~ /check_ssh|No such file|Permission|socket/) { - chomp($l); - notify($ERRORS{'CRITICAL'}, $log, "$node $TOOLS/check_ssh problem $l"); - return 0; - } - } ## end foreach my $l (@ssh) + + if(nmap_port($node,$port)){ + notify($ERRORS{'OK'}, $log, " $node ssh port $port open"); + return 1; + } + else{ + notify($ERRORS{'OK'}, $log, " $node ssh port $port closed"); return 0; - } ## end if (open(CHECKSSH, "$TOOLS/check_ssh -t 5 -p $port -H $node 2>&1 |"... + } + return 0; } ## end sub check_ssh #///////////////////////////////////////////////////////////////////////////// @@ -2776,10 +2769,6 @@ return "off"; } - if (!(check_ssh($node, 22))) { - return "off"; - } - my $identity = $IDENTITY_wxp; if (defined($imagename)) { $identity = $IDENTITY_bladerhel if ($imagename =~ /^(rh[0-9]image|rhel[0-9]|fc[0-9]image|rhfc[0-9]|rhas[0-9]|esx[0-9]+)/);