[check_postgres] [commit] Fix bad sort key in check_disk_space.

check_postgres at bucardo.org check_postgres at bucardo.org
Tue Jul 29 00:05:40 UTC 2008


Committed by Greg Sabino Mullane <greg at endpoint.com>

Fix bad sort key in check_disk_space.

---
 check_postgres.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/check_postgres.pl b/check_postgres.pl
index 55fc0b5..e84aea7 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -1986,7 +1986,7 @@ sub check_disk_space {
 			: $opt{mrtg} eq 'avail'   ? 2
 			: $opt{mrtg} eq 'percent' ? 3 : 2 : 2;
 		my ($one,$two,$msg) = ('','','');
-		for (sort { $b->[$sortby] <=> $a->[$sortby] } keys %stats) {
+		for (sort { $stats{$b}->[$sortby] <=> $stats{$a}->[$sortby] } keys %stats) {
 			if ($one eq '') {
 				$one = $stats{$_}->[$sortby];
 				$msg = $_;
-- 
1.5.5.4



More information about the Check_postgres mailing list