From 0ca02b4974303e94497a4d26ccb95c374df7549f Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 6 Mar 2018 08:43:05 +0100 Subject: [PATCH] Support space in httpd status key So total_accesses and total_kbytes are available again --- zabbix_scripts/check_httpd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zabbix_scripts/check_httpd b/zabbix_scripts/check_httpd index d9ce2a6..180726a 100644 --- a/zabbix_scripts/check_httpd +++ b/zabbix_scripts/check_httpd @@ -25,8 +25,8 @@ unless ($status){ } foreach my $line (split(/\n/, $status)){ - next unless ($line =~ m/^(\w+):\s([\.\d]+)/); - my ($key, $val) = ($1,$2); + next unless ($line =~ m/^(\w+(\s\w+)?):\s([\.\d]+)/); + my ($key, $val) = ($1,$3); $key =~ s/\s/_/g; $key = lc $key; # Remove leading and trailing spaces