Code

a46c2aa26e45bf248182ba4c701609a17652b0cc
[pkg-collectd.git] / debian / patches / bts802249_varnish_41.patch
1 Author: Marc Fournier <marc@bl.uem.li>
2 Description: disable metrics which have been removed from varnish 4.1.0. This
3 is a temporary fix to allow the build to succeed. Proper support for recent
4 varnish version is expected in a future collectd release.
5 https://github.com/collectd/collectd/issues/1302 keeps track of this problem.
6 --- a/src/varnish.c
7 +++ b/src/varnish.c
8 @@ -200,7 +200,7 @@ static void varnish_monitor (const user_config_t *conf, /* {{{ */
9                 /* Backend conn. reuses        */
10                 varnish_submit_derive (conf->instance, "backend", "connections", "reuses"       , stats->backend_reuse);
11                 /* Backend conn. was closed    */
12 -               varnish_submit_derive (conf->instance, "backend", "connections", "was-closed"   , stats->backend_toolate);
13 +               //varnish_submit_derive (conf->instance, "backend", "connections", "was-closed"   , stats->backend_toolate);
14                 /* Backend conn. recycles      */
15                 varnish_submit_derive (conf->instance, "backend", "connections", "recycled"     , stats->backend_recycle);
16  #if HAVE_VARNISH_V2
17 @@ -229,11 +229,11 @@ static void varnish_monitor (const user_config_t *conf, /* {{{ */
18                 /* Fetch bad headers         */
19                 varnish_submit_derive (conf->instance, "fetch", "http_requests", "bad_headers", stats->fetch_bad);
20                 /* Fetch wanted close        */
21 -               varnish_submit_derive (conf->instance, "fetch", "http_requests", "close"      , stats->fetch_close);
22 +               //varnish_submit_derive (conf->instance, "fetch", "http_requests", "close"      , stats->fetch_close);
23                 /* Fetch pre HTTP/1.1 closed */
24 -               varnish_submit_derive (conf->instance, "fetch", "http_requests", "oldhttp"    , stats->fetch_oldhttp);
25 +               //varnish_submit_derive (conf->instance, "fetch", "http_requests", "oldhttp"    , stats->fetch_oldhttp);
26                 /* Fetch zero len            */
27 -               varnish_submit_derive (conf->instance, "fetch", "http_requests", "zero"       , stats->fetch_zero);
28 +               //varnish_submit_derive (conf->instance, "fetch", "http_requests", "zero"       , stats->fetch_zero);
29                 /* Fetch failed              */
30                 varnish_submit_derive (conf->instance, "fetch", "http_requests", "failed"     , stats->fetch_failed);
31  #if HAVE_VARNISH_V3 || HAVE_VARNISH_V4
32 @@ -348,7 +348,7 @@ static void varnish_monitor (const user_config_t *conf, /* {{{ */
33                 /* Session Closed     */
34                 varnish_submit_derive (conf->instance, "session", "total_operations", "closed",    stats->sess_closed);
35                 /* Session Pipeline   */
36 -               varnish_submit_derive (conf->instance, "session", "total_operations", "pipeline",  stats->sess_pipeline);
37 +               //varnish_submit_derive (conf->instance, "session", "total_operations", "pipeline",  stats->sess_pipeline);
38                 /* Session Read Ahead */
39                 varnish_submit_derive (conf->instance, "session", "total_operations", "readahead", stats->sess_readahead);
40  #if HAVE_VARNISH_V4
41 @@ -359,7 +359,7 @@ static void varnish_monitor (const user_config_t *conf, /* {{{ */
42                 /* Sessions accept failure */
43                 varnish_submit_derive (conf->instance, "session", "total_operations", "failed",    stats->sess_fail);
44                 /* Sessions pipe overflow */
45 -               varnish_submit_derive (conf->instance, "session", "total_operations", "overflow",  stats->sess_pipe_overflow);
46 +               //varnish_submit_derive (conf->instance, "session", "total_operations", "overflow",  stats->sess_pipe_overflow);
47                 /* Sessions queued for thread */
48                 varnish_submit_derive (conf->instance, "session", "total_operations", "queued",    stats->sess_queued);
49  #else
50 @@ -415,15 +415,15 @@ static void varnish_monitor (const user_config_t *conf, /* {{{ */
51         if (conf->collect_sms)
52         {
53                 /* SMS allocator requests */
54 -               varnish_submit_derive (conf->instance, "sms", "total_requests", "allocator", stats->sms_nreq);
55 +               //varnish_submit_derive (conf->instance, "sms", "total_requests", "allocator", stats->sms_nreq);
56                 /* SMS outstanding allocations */
57 -               varnish_submit_gauge (conf->instance,  "sms", "requests", "outstanding",     stats->sms_nobj);
58 +               //varnish_submit_gauge (conf->instance,  "sms", "requests", "outstanding",     stats->sms_nobj);
59                 /* SMS outstanding bytes */
60 -               varnish_submit_gauge (conf->instance,  "sms", "bytes", "outstanding",        stats->sms_nbytes);
61 +               //varnish_submit_gauge (conf->instance,  "sms", "bytes", "outstanding",        stats->sms_nbytes);
62                 /* SMS bytes allocated */
63 -               varnish_submit_derive (conf->instance,  "sms", "total_bytes", "allocated",   stats->sms_balloc);
64 +               //varnish_submit_derive (conf->instance,  "sms", "total_bytes", "allocated",   stats->sms_balloc);
65                 /* SMS bytes freed */
66 -               varnish_submit_derive (conf->instance,  "sms", "total_bytes", "free",        stats->sms_bfree);
67 +               //varnish_submit_derive (conf->instance,  "sms", "total_bytes", "free",        stats->sms_bfree);
68         }
69  
70         if (conf->collect_struct)