Code

replace nginx_{accepts,handled} DSs
authorMarc Fournier <marc.fournier@camptocamp.com>
Mon, 15 Jul 2013 16:01:39 +0000 (18:01 +0200)
committerMarc Fournier <marc.fournier@camptocamp.com>
Mon, 15 Jul 2013 16:04:39 +0000 (18:04 +0200)
reusing an existing DS is preferred. GH#227.

src/nginx.c
src/types.db

index a87c35c986e35399acc1f0fe4232c4eeaf31f5f8..de52262f4ec817b1b54ca876652b02e06a845252 100644 (file)
@@ -181,9 +181,7 @@ 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)
+  else if (strcmp (type, "connections") == 0)
     values[0].derive = value;
   else
     return;
@@ -258,8 +256,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 ("connections", "accepted", atoll (fields[0]));
+       submit ("connections", "handled", atoll (fields[1]));
        submit ("nginx_requests", NULL, atoll (fields[2]));
       }
     }
index 38655878a47220a9736b041ec255c7a9af58bc5d..4922aa75f06338626e661878fb8d296eecec74e3 100644 (file)
@@ -107,8 +107,6 @@ 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