summaryrefslogtreecommitdiff
path: root/check_postgres.pl
diff options
context:
space:
mode:
authorGreg Sabino Mullane2008-07-28 23:37:16 +0000
committerGreg Sabino Mullane2008-07-28 23:37:16 +0000
commit40c7d713d07ac450e17959aa74d7232beaff2148 (patch)
tree9dda9314de3c0d5466ebadc25fd84b8b89708817 /check_postgres.pl
parentf22f65efc094b4f7a0a4e472bc1696f0613db3ba (diff)
Fix bad sort key in check_disk_space.
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-xcheck_postgres.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/check_postgres.pl b/check_postgres.pl
index 55fc0b50d..e84aea700 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 = $_;