Support space in httpd status key

So total_accesses and total_kbytes are available again
tags/zabbix-agent-addons-0.2.26-1
Daniel Berteaud 7 years ago
parent 3a9ec69a56
commit 0ca02b4974
  1. 4
      zabbix_scripts/check_httpd

@ -25,8 +25,8 @@ unless ($status){
} }
foreach my $line (split(/\n/, $status)){ foreach my $line (split(/\n/, $status)){
next unless ($line =~ m/^(\w+):\s([\.\d]+)/); next unless ($line =~ m/^(\w+(\s\w+)?):\s([\.\d]+)/);
my ($key, $val) = ($1,$2); my ($key, $val) = ($1,$3);
$key =~ s/\s/_/g; $key =~ s/\s/_/g;
$key = lc $key; $key = lc $key;
# Remove leading and trailing spaces # Remove leading and trailing spaces

Loading…
Cancel
Save