summaryrefslogtreecommitdiffstats
path: root/plugins-scripts
diff options
context:
space:
mode:
authorSven Nierlein <sven@consol.de>2024-10-31 22:33:07 +0100
committerSven Nierlein <sven@consol.de>2024-10-31 22:33:07 +0100
commitad99acbb8b51835fddbbe67838a6ca7c5f114b18 (patch)
tree1a7ed7c445c74511796f1fa2e4bfd3e7e6f7e011 /plugins-scripts
parent6d1d1dac32841d5ca6ee51bb09b30a6c604b17e2 (diff)
downloadmonitoring-plugins-ad99acbb8b51835fddbbe67838a6ca7c5f114b18.tar.gz
check_rpc: recognize capitalized "Program" in rpcinfo output (fixes #1488)
Signed-off-by: Sven Nierlein <sven@consol.de>
Diffstat (limited to 'plugins-scripts')
-rwxr-xr-xplugins-scripts/check_rpc.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins-scripts/check_rpc.pl b/plugins-scripts/check_rpc.pl
index 8a56b9fc..0968982e 100755
--- a/plugins-scripts/check_rpc.pl
+++ b/plugins-scripts/check_rpc.pl
@@ -311,18 +311,18 @@ sub get_rpcinfo {
311 printf "$line " if $verbose; 311 printf "$line " if $verbose;
312 chomp $line; 312 chomp $line;
313 313
314 if ( $line =~ /program $prognum version ([0-9]*) ready and waiting/ ) { 314 if ( $line =~ /[Pp]rogram $prognum version ([0-9]*) ready and waiting/ ) {
315 $response .= " version $1"; 315 $response .= " version $1";
316 $state = 'OK' unless $state ne 'UNKNOWN'; 316 $state = 'OK' unless $state ne 'UNKNOWN';
317 print "1:$response \n" if $verbose; 317 print "1:$response \n" if $verbose;
318 } 318 }
319 319
320 if ( $line =~ /program $prognum version ([0-9]*) is not available/ ) { 320 if ( $line =~ /[Pp]rogram $prognum version ([0-9]*) is not available/ ) {
321 $response2 .= " version $1"; 321 $response2 .= " version $1";
322 $state = 'CRITICAL'; 322 $state = 'CRITICAL';
323 print "2:$response2 \n" if $verbose; 323 print "2:$response2 \n" if $verbose;
324 } 324 }
325 if ( $line =~ /program $prognum is not available/ ) { 325 if ( $line =~ /[Pp]rogram $prognum is not available/ ) {
326 $response3 = ""; 326 $response3 = "";
327 $response3 = "tcp" if $opt_t; 327 $response3 = "tcp" if $opt_t;
328 $response3 = "udp" if $opt_u; 328 $response3 = "udp" if $opt_u;