From c210d9ec19724d829d8744b35a7426837b76982e Mon Sep 17 00:00:00 2001 From: Pavel Rochnyack Date: Wed, 9 Mar 2016 16:39:22 +0600 Subject: [PATCH] nginx plugin: Report failed connections --- src/nginx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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])); } } -- 2.30.2