Check line format in check_httpd
Instead of spliting errors in case server-status redirect to somewhere else
This commit is contained in:
parent
a548d599bf
commit
f714617bec
|
@ -25,7 +25,8 @@ unless ($status){
|
|||
}
|
||||
|
||||
foreach my $line (split(/\n/, $status)){
|
||||
my ($key, $val) = split(/:/, $line);
|
||||
next unless ($line =~ m/^(\w+):\s([\.\d]+)/);
|
||||
my ($key, $val) = ($1,$2);
|
||||
$key =~ s/\s/_/g;
|
||||
$key = lc $key;
|
||||
# Remove leading and trailing spaces
|
||||
|
|
Loading…
Reference in New Issue
Block a user