X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fvarnish.c;h=de60e39c7b21759f0fdefb062d3d74475df90fed;hb=77311aed583ac4566d76f1ce3a1dc9deae2e59dc;hp=d0e6a805abedf270efbea24b0d39102152add46d;hpb=cf53a249931fcce4e4fcececc807432f09a44abf;p=collectd.git diff --git a/src/varnish.c b/src/varnish.c index d0e6a805..de60e39c 100644 --- a/src/varnish.c +++ b/src/varnish.c @@ -216,7 +216,7 @@ static int varnish_submit_derive (const char *plugin_instance, /* {{{ */ } /* }}} int varnish_submit_derive */ static void varnish_monitor (const user_config_t *conf, /* {{{ */ - c_varnish_stats_t *stats) + const c_varnish_stats_t *stats) { if (conf->collect_cache) { @@ -412,6 +412,11 @@ static int varnish_read (user_data_t *ud) /* {{{ */ vd = VSM_New(); VSC_Setup(vd); + if (VSM_n_Arg(vd, conf->instance) == -1) + { + ERROR ("Varnish plugin : unable to load statistics from instance"); + return (-1); + } if (VSC_Open (vd, /* diag = */ 1)) { ERROR ("varnish plugin: Unable to load statistics.");