]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
Add backend name in vbe stat 3446/head
authorCharly Koza <cka@f4-group.com>
Mon, 27 Apr 2020 09:57:39 +0000 (11:57 +0200)
committerCharly Koza <cka@f4-group.com>
Tue, 28 Apr 2020 09:46:25 +0000 (11:46 +0200)
src/varnish.c

index 5eed3e7142832ec0d441894422f7c1dce30562dd..88d0d8d9703cab7b4e12b21d96e131819440dba1 100644 (file)
@@ -858,38 +858,45 @@ static int varnish_monitor(void *priv,
                                    "bitmap", "happy_hprobes", val);
     */
     if (strcmp(name, "bereq_hdrbytes") == 0)
-      return varnish_submit_derive(conf->instance, "vbe", "total_bytes",
-                                   "bereq_hdrbytes", val);
+      return varnish_submit_derive_with_target(conf->instance, "vbe",
+                                               stat_target, "total_bytes",
+                                               "bereq_hdrbytes", val);
     else if (strcmp(name, "bereq_bodybytes") == 0)
-      return varnish_submit_derive(conf->instance, "vbe", "total_bytes",
-                                   "bereq_bodybytes", val);
+      return varnish_submit_derive_with_target(conf->instance, "vbe",
+                                               stat_target, "total_bytes",
+                                               "bereq_bodybytes", val);
     else if (strcmp(name, "bereq_protobytes") == 0)
-      return varnish_submit_derive(conf->instance, "vbe", "total_bytes",
-                                   "bereq_protobytes", val);
+      return varnish_submit_derive_with_target(conf->instance, "vbe",
+                                               stat_target, "total_bytes",
+                                               "bereq_protobytes", val);
     else if (strcmp(name, "beresp_hdrbytes") == 0)
-      return varnish_submit_derive(conf->instance, "vbe", "total_bytes",
-                                   "beresp_hdrbytes", val);
+      return varnish_submit_derive_with_target(conf->instance, "vbe",
+                                               stat_target, "total_bytes",
+                                               "beresp_hdrbytes", val);
     else if (strcmp(name, "beresp_bodybytes") == 0)
-      return varnish_submit_derive(conf->instance, "vbe", "total_bytes",
-                                   "beresp_bodybytes", val);
+      return varnish_submit_derive_with_target(conf->instance, "vbe",
+                                               stat_target, "total_bytes",
+                                               "beresp_bodybytes", val);
     else if (strcmp(name, "beresp_protobytes") == 0)
-      return varnish_submit_derive(conf->instance, "vbe", "total_bytes",
-                                   "beresp_protobytes", val);
+      return varnish_submit_derive_with_target(conf->instance, "vbe",
+                                               stat_target, "total_bytes",
+                                               "beresp_protobytes", val);
     else if (strcmp(name, "pipe_hdrbytes") == 0)
-      return varnish_submit_derive(conf->instance, "vbe", "total_bytes",
-                                   "pipe_hdrbytes", val);
+      return varnish_submit_derive_with_target(conf->instance, "vbe",
+                                               stat_target, "total_bytes",
+                                               "pipe_hdrbytes", val);
     else if (strcmp(name, "pipe_out") == 0)
-      return varnish_submit_derive(conf->instance, "vbe", "total_bytes",
-                                   "pipe_out", val);
+      return varnish_submit_derive_with_target(
+          conf->instance, "vbe", stat_target, "total_bytes", "pipe_out", val);
     else if (strcmp(name, "pipe_in") == 0)
-      return varnish_submit_derive(conf->instance, "vbe", "total_bytes",
-                                   "pipe_in", val);
+      return varnish_submit_derive_with_target(
+          conf->instance, "vbe", stat_target, "total_bytes", "pipe_in", val);
     else if (strcmp(name, "conn") == 0)
-      return varnish_submit_derive(conf->instance, "vbe", "connections",
-                                   "c_conns", val);
+      return varnish_submit_derive_with_target(
+          conf->instance, "vbe", stat_target, "connections", "c_conns", val);
     else if (strcmp(name, "req") == 0)
-      return varnish_submit_derive(conf->instance, "vbe", "http_requests",
-                                   "b_reqs", val);
+      return varnish_submit_derive_with_target(
+          conf->instance, "vbe", stat_target, "http_requests", "b_reqs", val);
   }
 
   /* All Stevedores support these counters */