diff --git a/zabbix_scripts/check_httpd b/zabbix_scripts/check_httpd index 201e644..d9ce2a6 100644 --- a/zabbix_scripts/check_httpd +++ b/zabbix_scripts/check_httpd @@ -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