]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
Restrict workers stats to versions before v6 3445/head
authorCharly Koza <cka@f4-group.com>
Thu, 23 Apr 2020 14:34:16 +0000 (16:34 +0200)
committerCharly Koza <cka@f4-group.com>
Mon, 27 Apr 2020 14:45:30 +0000 (16:45 +0200)
src/varnish.c

index ff091e8c4889ea903ed44cad220b371726be52c4..559b44c929a17579684c6d556452bd7c2715b722 100644 (file)
@@ -715,6 +715,7 @@ static int varnish_monitor(void *priv,
     else if (strcmp(name, "thread_queue_len") == 0)
       return varnish_submit_gauge(conf->instance, "workers", "queue_length",
                                   "threads", val);
+#if HAVE_VARNISH_V2 || HAVE_VARNISH_V3 || HAVE_VARNISH_V4 || HAVE_VARNISH_V5
     else if (strcmp(name, "n_wrk") == 0)
       return varnish_submit_gauge(conf->instance, "workers", "threads",
                                   "worker", val);
@@ -742,6 +743,7 @@ static int varnish_monitor(void *priv,
     else if (strcmp(name, "n_wrk_lqueue") == 0)
       return varnish_submit_derive(conf->instance, "workers", "total_requests",
                                    "queue_length", val);
+#endif
 #if HAVE_VARNISH_V4 || HAVE_VARNISH_V5 || HAVE_VARNISH_V6
     else if (strcmp(name, "pools") == 0)
       return varnish_submit_gauge(conf->instance, "workers", "pools", "pools",