From: Patrick Shan Date: Thu, 3 Jan 2013 03:58:59 +0000 (+1100) Subject: * change nginx plugin for collectd to submit "nginx_accepts" and X-Git-Tag: collectd-5.4.0~19 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f87a715c49a41472dbeb5f244d84691365ef8745;p=collectd.git * change nginx plugin for collectd to submit "nginx_accepts" and * "nginx_handled" --- diff --git a/src/nginx.c b/src/nginx.c index 7568a2c5..a87c35c9 100644 --- a/src/nginx.c +++ b/src/nginx.c @@ -181,6 +181,10 @@ static void submit (char *type, char *inst, long long value) values[0].gauge = value; else if (strcmp (type, "nginx_requests") == 0) values[0].derive = value; + else if (strcmp (type, "nginx_accepts") == 0) + values[0].derive = value; + else if (strcmp (type, "nginx_handled") == 0) + values[0].derive = value; else return; @@ -254,6 +258,8 @@ static int nginx_read (void) && (atoll (fields[1]) != 0) && (atoll (fields[2]) != 0)) { + submit ("nginx_accepts", NULL, atoll (fields[0])); + submit ("nginx_handled", NULL, atoll (fields[1])); submit ("nginx_requests", NULL, atoll (fields[2])); } } diff --git a/src/types.db b/src/types.db index 4922aa75..38655878 100644 --- a/src/types.db +++ b/src/types.db @@ -107,6 +107,8 @@ mysql_octets rx:DERIVE:0:U, tx:DERIVE:0:U nfs_procedure value:DERIVE:0:U nginx_connections value:GAUGE:0:U nginx_requests value:DERIVE:0:U +nginx_accepts value:DERIVE:0:U +nginx_handled value:DERIVE:0:U node_octets rx:DERIVE:0:U, tx:DERIVE:0:U node_rssi value:GAUGE:0:255 node_stat value:DERIVE:0:U