From e14541d2a6aef243c306d4decbbcd42cbd5386d4 Mon Sep 17 00:00:00 2001 From: Jeff Boes Date: Mon, 27 Apr 2009 17:09:49 -0400 Subject: Add tests for disk_space; added missing msg name. --- check_postgres.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'check_postgres.pl') 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"; -- cgit v1.2.3