[monitoring-plugins] check_rpc: recognize capitalized "Program" in ...

Sven Nierlein git at monitoring-plugins.org
Thu Oct 31 22:40:11 CET 2024


 Module: monitoring-plugins
 Branch: master
 Commit: ad99acbb8b51835fddbbe67838a6ca7c5f114b18
 Author: Sven Nierlein <sven at consol.de>
   Date: Thu Oct 31 22:33:07 2024 +0100
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=ad99acb

check_rpc: recognize capitalized "Program" in rpcinfo output (fixes #1488)

Signed-off-by: Sven Nierlein <sven at consol.de>

---

 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 8a56b9f..0968982 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;



More information about the Commits mailing list