From 0234ca32d982a1e66b84091282cb30ab783e8fae Mon Sep 17 00:00:00 2001 From: Jordi Sanfeliu Date: Thu, 28 Nov 2013 11:12:09 +0100 Subject: [PATCH] fixed the requests value in the 'nginx' graph. Now it honours the label to show the value per second, instead of per minute --- Changes | 2 ++ lib/nginx.pm | 1 + 2 files changed, 3 insertions(+) diff --git a/Changes b/Changes index c571ccb..53b6138 100644 --- a/Changes +++ b/Changes @@ -41,6 +41,8 @@ [#30] (thanks to Jacob Amey, jamey AT securityinspection.com for pointing this out) - Fixed a typo in monitorix.service. [#32] +- Fixed the requests value in the 'nginx' graph. Now it honours the label to + show the value per second, instead of per minute. - Small fixes and typos. diff --git a/lib/nginx.pm b/lib/nginx.pm index a797d51..3fd03fa 100644 --- a/lib/nginx.pm +++ b/lib/nginx.pm @@ -160,6 +160,7 @@ sub nginx_update { if(/^\s+(\d+)\s+(\d+)\s+(\d+)\s*/) { $reqs = $3 - ($config->{nginx_hist}->{'requests'} || 0); $reqs = 0 unless $reqs != $3; + $reqs /= 60; $config->{nginx_hist}->{'requests'} = $3; } if(/^Reading:\s+(\d+).*Writing:\s+(\d+).*Waiting:\s+(\d+)\s*/) {