diff options
author | Jeff Boes | 2009-04-27 21:09:49 +0000 |
---|---|---|
committer | Jeff Boes | 2009-04-27 21:09:49 +0000 |
commit | e14541d2a6aef243c306d4decbbcd42cbd5386d4 (patch) | |
tree | a2b1a57d83a7093c8ccec41c0dc8e8739649f82c /check_postgres.pl | |
parent | fb5467d3a25f94ba06b0c4236a2f91cea25fe372 (diff) |
Add tests for disk_space; added missing msg name.
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-x | check_postgres.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/check_postgres.pl b/check_postgres.pl index 85c553967..c49b965ae 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -2663,7 +2663,7 @@ sub check_disk_space { my %seenfs; for $db (@{$info->{db}}) { my %i; - while ($db->{slurp} =~ /([ST])\s+\| (\w+)\s+\| (\S*)\s*/g) { + while ($db->{slurp} =~ /([ST])\s+\| (\w+)\s+\| (.*?)\n/g) { my ($st,$name,$val) = ($1,$2,$3); $i{$st}{$name} = $val; } @@ -2717,7 +2717,7 @@ sub check_disk_space { $dir{$dir} = 1; - $COM = "/bin/df -kP $dir 2>&1"; + $COM = qq{/bin/df -kP "$dir" 2>&1}; $res = qx{$COM}; if ($res !~ /^.+\n(\S+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\%\s+(\S+)/) { @@ -2741,7 +2741,7 @@ sub check_disk_space { my $prettyused = pretty_size($used); my $prettytotal = pretty_size($total); - my $msg = msg('', $fs, $mount, $prettyused, $prettytotal, $percent); + my $msg = msg('diskspace-msg', $fs, $mount, $prettyused, $prettytotal, $percent); $db->{perf} = "$fs=$used"; |