projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nginx plugin: Report failed connections
[collectd.git]
/
src
/
nginx.c
diff --git
a/src/nginx.c
b/src/nginx.c
index
7283488
..
c03c67e
100644
(file)
--- a/
src/nginx.c
+++ b/
src/nginx.c
@@
-256,7
+256,7
@@
static int nginx_read (void)
/*
* Active connections: 291
* server accepts handled requests
/*
* Active connections: 291
* server accepts handled requests
- * 1
6630948 16630948 31070465
+ * 1
01059015 100422216 347910649
* Reading: 6 Writing: 179 Waiting: 106
*/
for (int i = 0; i < lines_num; i++)
* 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", "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]));
}
}
submit ("nginx_requests", NULL, atoll (fields[2]));
}
}