Several fields were added in commit
8775392. 3 of them make the build
fail when varnish 2.0.x is used. This patch makes them available only
when using varnish 3.x.
The commit message of
8775392 gives more detail on the rationale behind
this way of doing.
#endif
_Bool collect_struct;
_Bool collect_totals;
#endif
_Bool collect_struct;
_Bool collect_totals;
_Bool collect_vcl;
_Bool collect_workers;
};
_Bool collect_vcl;
_Bool collect_workers;
};
varnish_submit_gauge (conf->instance, "struct", "current_sessions", "sess", stats->n_sess);
/* N struct object */
varnish_submit_gauge (conf->instance, "struct", "objects", "object", stats->n_object);
varnish_submit_gauge (conf->instance, "struct", "current_sessions", "sess", stats->n_sess);
/* N struct object */
varnish_submit_gauge (conf->instance, "struct", "objects", "object", stats->n_object);
/* N unresurrected objects */
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 unresurrected objects */
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 objecthead */
varnish_submit_gauge (conf->instance, "struct", "objects", "objecthead", stats->n_objecthead);
#ifdef HAVE_VARNISH_V2
/* N struct objecthead */
varnish_submit_gauge (conf->instance, "struct", "objects", "objecthead", stats->n_objecthead);
#ifdef HAVE_VARNISH_V2
varnish_submit_derive (conf->instance, "totals", "total_bytes", "body-bytes", stats->s_bodybytes);
}
varnish_submit_derive (conf->instance, "totals", "total_bytes", "body-bytes", stats->s_bodybytes);
}
if (conf->collect_uptime)
{
/* Client uptime */
varnish_submit_gauge (conf->instance, "uptime", "uptime", "client_uptime", stats->uptime);
}
if (conf->collect_uptime)
{
/* Client uptime */
varnish_submit_gauge (conf->instance, "uptime", "uptime", "client_uptime", stats->uptime);
}
conf->collect_sms = 0;
conf->collect_struct = 0;
conf->collect_totals = 0;
conf->collect_sms = 0;
conf->collect_struct = 0;
conf->collect_totals = 0;
conf->collect_uptime = 0;
conf->collect_uptime = 0;
conf->collect_vcl = 0;
conf->collect_workers = 0;
conf->collect_vcl = 0;
conf->collect_workers = 0;
cf_util_get_boolean (child, &conf->collect_struct);
else if (strcasecmp ("CollectTotals", child->key) == 0)
cf_util_get_boolean (child, &conf->collect_totals);
cf_util_get_boolean (child, &conf->collect_struct);
else if (strcasecmp ("CollectTotals", child->key) == 0)
cf_util_get_boolean (child, &conf->collect_totals);
else if (strcasecmp ("CollectUptime", child->key) == 0)
cf_util_get_boolean (child, &conf->collect_uptime);
else if (strcasecmp ("CollectUptime", child->key) == 0)
cf_util_get_boolean (child, &conf->collect_uptime);
else if (strcasecmp ("CollectVCL", child->key) == 0)
cf_util_get_boolean (child, &conf->collect_vcl);
else if (strcasecmp ("CollectWorkers", child->key) == 0)
else if (strcasecmp ("CollectVCL", child->key) == 0)
cf_util_get_boolean (child, &conf->collect_vcl);
else if (strcasecmp ("CollectWorkers", child->key) == 0)
#endif
&& !conf->collect_struct
&& !conf->collect_totals
#endif
&& !conf->collect_struct
&& !conf->collect_totals
&& !conf->collect_vcl
&& !conf->collect_workers)
{
&& !conf->collect_vcl
&& !conf->collect_workers)
{