From: Matthias Runge Date: Fri, 13 Mar 2020 14:10:40 +0000 (+0100) Subject: Revert "Add counter for vmod-goto, only for Varnish Plus 6" X-Git-Tag: collectd-5.11.0~2^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=81cd575ebd1d419ca0ad2ab7761a63432f722285;p=thirdparty%2Fcollectd.git Revert "Add counter for vmod-goto, only for Varnish Plus 6" This reverts commit bbe35ddec9a20a63be5d7ae05c30e24efca8fe6d. --- diff --git a/src/collectd.conf.in b/src/collectd.conf.in index c09a0c1f5..b3401561b 100644 --- a/src/collectd.conf.in +++ b/src/collectd.conf.in @@ -1831,7 +1831,6 @@ # CollectSMF false # CollectVBE false # CollectMSE false # Varnish-Plus only -# CollectGOTO false # Varnish-Plus 6 only # # diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod index 09ea15fc2..7eade44c0 100644 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@ -9975,10 +9975,6 @@ Varnish, replacing the traditional malloc and file storages. Only available with Varnish-Plus 4.x. Note: SMA, SMF and MSE share counters, enable only the one used by the Varnish instance. False by default. -=item B B|B - -vmod-goto counters. Only available with Varnish Plus 6.x. False by default. - =back =head2 Plugin C diff --git a/src/varnish.c b/src/varnish.c index d4f3c5ac7..e8d8ec347 100644 --- a/src/varnish.c +++ b/src/varnish.c @@ -63,9 +63,6 @@ struct user_config_s { bool collect_smf; bool collect_vbe; bool collect_mse; -#if HAVE_VARNISH_V6 - bool collect_goto; -#endif }; typedef struct user_config_s user_config_t; /* }}} */ @@ -936,20 +933,6 @@ static int varnish_monitor(void *priv, "total_operations", "sniped_objects", val); } -#if HAVE_VARNISH_V6 - if (conf->collect_goto) { - if (strcmp(name, "goto_dns_cache_hits") == 0) - return varnish_submit_derive(conf->instance, "goto", "total_operations", - "dns_cache_hits", val); - else if (strcmp(name, "goto_dns_lookups") == 0) - return varnish_submit_derive(conf->instance, "goto", "total_operations", - "dns_lookups", val); - else if (strcmp(name, "goto_dns_lookup_fails") == 0) - return varnish_submit_derive(conf->instance, "goto", "total_operations", - "dns_lookup_fails", val); - } -#endif - return 0; } /* }}} static int varnish_monitor */ @@ -1095,9 +1078,6 @@ static int varnish_config_apply_default(user_config_t *conf) /* {{{ */ conf->collect_smf = false; conf->collect_vbe = false; conf->collect_mse = false; -#if HAVE_VARNISH_V6 - conf->collect_goto = false; -#endif return 0; } /* }}} int varnish_config_apply_default */ @@ -1222,13 +1202,6 @@ static int varnish_config_instance(const oconfig_item_t *ci) /* {{{ */ cf_util_get_boolean(child, &conf->collect_vbe); else if (strcasecmp("CollectMSE", child->key) == 0) cf_util_get_boolean(child, &conf->collect_mse); - else if (strcasecmp("CollectGOTO", child->key) == 0) -#if HAVE_VARNISH_V6 - cf_util_get_boolean(child, &conf->collect_goto); -#else - WARNING("Varnish plugin: \"%s\" is available for Varnish %s only.", - child->key, "v6"); -#endif else { WARNING("Varnish plugin: Ignoring unknown " "configuration option: \"%s\". Did " @@ -1248,11 +1221,7 @@ static int varnish_config_instance(const oconfig_item_t *ci) /* {{{ */ && !conf->collect_vsm #endif && !conf->collect_vbe && !conf->collect_smf && !conf->collect_mgt && - !conf->collect_lck && !conf->collect_mempool && !conf->collect_mse -#if HAVE_VARNISH_V6 - && !conf->collect_goto -#endif - ) { + !conf->collect_lck && !conf->collect_mempool && !conf->collect_mse) { WARNING("Varnish plugin: No metric has been configured for " "instance \"%s\". Disabling this instance.", (conf->instance == NULL) ? "localhost" : conf->instance);