packages: nagios-plugin-check_redis/check_redis.pl - whitespace cleanup

glen glen at pld-linux.org
Tue Dec 20 11:51:14 CET 2011


Author: glen                         Date: Tue Dec 20 10:51:14 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- whitespace cleanup

---- Files affected:
packages/nagios-plugin-check_redis:
   check_redis.pl (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: packages/nagios-plugin-check_redis/check_redis.pl
diff -u packages/nagios-plugin-check_redis/check_redis.pl:1.2 packages/nagios-plugin-check_redis/check_redis.pl:1.3
--- packages/nagios-plugin-check_redis/check_redis.pl:1.2	Tue Dec 20 11:50:45 2011
+++ packages/nagios-plugin-check_redis/check_redis.pl	Tue Dec 20 11:51:09 2011
@@ -1,4 +1,4 @@
-#!/usr/bin/perl 
+#!/usr/bin/perl
 
 # nagios: -epn
 
@@ -23,7 +23,7 @@
 use Redis;
 use File::Basename;
 use lib '/usr/lib/nagios/plugins';
-use utils qw($TIMEOUT %ERRORS &print_revision &support); 
+use utils qw($TIMEOUT %ERRORS &print_revision &support);
 use Time::Local;
 use vars qw($opt_h); # Redis Ö÷»ú
 use vars qw($opt_p); # Redis ¶Ë¿Ú
@@ -75,65 +75,65 @@
 my $run = $stop - $start;
 
 if ( $run > $opt_c ) {
-	
+
 	print "CRITICAL - redis server(" . $opt_h . ") run for " . $run . " seconds!";
 	exit $ERRORS{"CRITICAL"};
-	
+
 } elsif ( $run > $opt_w ) {
-	
+
 	print "WARNING - redis server(" . $opt_h . ") run for " . $run . " seconds!";
 	exit $ERRORS{"WARNING"};
-	
+
 } else {
-	
+
 	redis_info();
 	redis_quit();
 	exit $ERRORS{"OK"};
-	
+
 }
 
 
 sub help{
-	
+
 	die "Usage:\n" , basename( $0 ) ,  " -h hostname -p port -w warning time -c critical time -d down time\n"
-	
+
 }
 
 sub redis_connect{
-	
+
 	my $redis_hp = $opt_h . ":" . $opt_p;
-	
+
 	eval{ $r = Redis->new( server => $redis_hp ); };
-	
+
 }
 
 sub redis_set{
-	
+
 	$r->set( redis_nagios_key => 'test' ) || return 1;
-	
+
 	return 0;
 }
 
 sub redis_get{
-	
+
 	my $value = $r->get( 'redis_nagios_key' ) || return 1;
-	
+
 	return 0;
 }
 
 sub redis_del{
-	
+
 	$r->del( 'redis_nagios_key' ) || return 1;
-	
+
 	return 0;
 }
 
 sub redis_info{
-	
+
 	my $info_hash = $r->info;
-	
+
 	print "OK - redis server(" . $opt_h . ") info:";
-	
+
 	while ( my ($key, $value) = each(%$info_hash) ) {
 	    print "$key => $value, ";
 	}
@@ -141,7 +141,7 @@
 }
 
 sub redis_quit{
-	
+
 	$r->quit();
-	
-}
\ No newline at end of file
+
+}
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nagios-plugin-check_redis/check_redis.pl?r1=1.2&r2=1.3&f=u




More information about the pld-cvs-commit mailing list