From ad99acbb8b51835fddbbe67838a6ca7c5f114b18 Mon Sep 17 00:00:00 2001 From: Sven Nierlein Date: Thu, 31 Oct 2024 22:33:07 +0100 Subject: check_rpc: recognize capitalized "Program" in rpcinfo output (fixes #1488) Signed-off-by: Sven Nierlein --- plugins-scripts/check_rpc.pl | 6 +++--- 1 file 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 { printf "$line " if $verbose; chomp $line; - if ( $line =~ /program $prognum version ([0-9]*) ready and waiting/ ) { + if ( $line =~ /[Pp]rogram $prognum version ([0-9]*) ready and waiting/ ) { $response .= " version $1"; $state = 'OK' unless $state ne 'UNKNOWN'; print "1:$response \n" if $verbose; } - if ( $line =~ /program $prognum version ([0-9]*) is not available/ ) { + if ( $line =~ /[Pp]rogram $prognum version ([0-9]*) is not available/ ) { $response2 .= " version $1"; $state = 'CRITICAL'; print "2:$response2 \n" if $verbose; } - if ( $line =~ /program $prognum is not available/ ) { + if ( $line =~ /[Pp]rogram $prognum is not available/ ) { $response3 = ""; $response3 = "tcp" if $opt_t; $response3 = "udp" if $opt_u; -- cgit v1.2.3-74-g34f1