Verified Commit 5fdf684e authored by Florian Pritz's avatar Florian Pritz
Browse files

nginx-zabbix: Measure number of cached requests (0.000 request time)


Signed-off-by: Florian Pritz's avatarFlorian Pritz <bluewind@xinu.at>
parent e28df1c7
......@@ -58,6 +58,7 @@ sub main {
},
# counter since prog start
request_count => 0,
cached_request_count => 0,
# calculated values since last send
request_time => {
max => 0,
......@@ -88,6 +89,7 @@ sub main {
$stat->add_data($+{request_time}) if $+{request_time} != 0;
$values->{request_count}++;
$values->{cached_request_count}++ if $+{request_time} == 0;
my $status_key = defined $values->{status}->{$+{status}} ? $+{status} : "other";
$values->{status}->{$status_key}++;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment