From: Pavel Rochnyack Date: Wed, 9 Mar 2016 10:39:22 +0000 (+0600) Subject: nginx plugin: Report failed connections X-Git-Tag: collectd-5.7.0~50^2~1 X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=c210d9ec19724d829d8744b35a7426837b76982e nginx plugin: Report failed connections --- diff --git a/src/nginx.c b/src/nginx.c index 7283488f..c03c67ea 100644 --- a/src/nginx.c +++ b/src/nginx.c @@ -256,7 +256,7 @@ static int nginx_read (void) /* * Active connections: 291 * server accepts handled requests - * 16630948 16630948 31070465 + * 101059015 100422216 347910649 * Reading: 6 Writing: 179 Waiting: 106 */ for (int i = 0; i < lines_num; i++) @@ -277,6 +277,7 @@ static int nginx_read (void) { submit ("connections", "accepted", atoll (fields[0])); submit ("connections", "handled", atoll (fields[1])); + submit ("connections", "failed", (atoll(fields[0]) - atoll (fields[1]))); submit ("nginx_requests", NULL, atoll (fields[2])); } }