From: Marc Fournier Date: Tue, 28 Oct 2014 16:55:41 +0000 (+0100) Subject: varnish: add a couple of metrics available both in V3 & V4 X-Git-Tag: collectd-5.5.0~138^2~5 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=e937457838e63cc0422396222552020ff72c0d75;p=collectd.git varnish: add a couple of metrics available both in V3 & V4 --- diff --git a/src/varnish.c b/src/varnish.c index e3b6cec1..bdff16a9 100644 --- a/src/varnish.c +++ b/src/varnish.c @@ -435,6 +435,8 @@ static void varnish_monitor (const user_config_t *conf, /* {{{ */ varnish_submit_gauge (conf->instance, "struct", "objects", "vampireobject", stats->n_vampireobject); /* N struct objectcore */ varnish_submit_gauge (conf->instance, "struct", "objects", "objectcore", stats->n_objectcore); + /* N struct waitinglist */ + varnish_submit_gauge (conf->instance, "struct", "objects", "waitinglist", stats->n_waitinglist); #endif /* N struct objecthead */ varnish_submit_gauge (conf->instance, "struct", "objects", "objecthead", stats->n_objecthead); @@ -485,6 +487,12 @@ static void varnish_monitor (const user_config_t *conf, /* {{{ */ /* Total body byte */ varnish_submit_derive (conf->instance, "totals", "total_bytes", "body-bytes", stats->s_bodybytes); #endif +#if HAVE_VARNISH_V3 || HAVE_VARNISH_V4 + /* Gzip operations */ + varnish_submit_derive (conf->instance, "totals", "total_operations", "gzip", stats->n_gzip); + /* Gunzip operations */ + varnish_submit_derive (conf->instance, "totals", "total_operations", "gunzip", stats->n_gunzip); +#endif } #if HAVE_VARNISH_V3 || HAVE_VARNISH_V4 @@ -503,6 +511,10 @@ static void varnish_monitor (const user_config_t *conf, /* {{{ */ varnish_submit_gauge (conf->instance, "vcl", "vcl", "avail_vcl", stats->n_vcl_avail); /* N vcl discarded */ varnish_submit_gauge (conf->instance, "vcl", "vcl", "discarded_vcl", stats->n_vcl_discard); +#if HAVE_VARNISH_V3 || HAVE_VARNISH_V4 + /* Loaded VMODs */ + varnish_submit_gauge (conf->instance, "vcl", "objects", "vmod", stats->vmods); +#endif } if (conf->collect_workers)