2 * collectd - src/varnish.c
3 * Copyright (C) 2010 Jérôme Renard
4 * Copyright (C) 2010 Marc Fournier
5 * Copyright (C) 2010-2012 Florian Forster
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; only version 2 of the License is applicable.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 * Jérôme Renard <jerome.renard at gmail.com>
22 * Marc Fournier <marc.fournier at camptocamp.com>
23 * Florian octo Forster <octo at collectd.org>
29 #include "configfile.h"
34 typedef struct VSC_C_main c_varnish_stats_t;
38 #include <varnishapi.h>
40 typedef struct VSC_C_main c_varnish_stats_t;
44 #include <varnishapi.h>
45 typedef struct varnish_stats c_varnish_stats_t;
48 /* {{{ user_config_s */
49 struct user_config_s {
53 _Bool collect_connections;
55 _Bool collect_backend;
56 #ifdef HAVE_VARNISH_V3
61 _Bool collect_objects;
67 _Bool collect_session;
76 #if HAVE_VARNISH_V3 || HAVE_VARNISH_V4
80 _Bool collect_workers;
85 typedef struct user_config_s user_config_t; /* }}} */
87 static _Bool have_instance = 0;
89 static int varnish_submit (const char *plugin_instance, /* {{{ */
90 const char *category, const char *type, const char *type_instance, value_t value)
92 value_list_t vl = VALUE_LIST_INIT;
97 sstrncpy (vl.host, hostname_g, sizeof (vl.host));
99 sstrncpy (vl.plugin, "varnish", sizeof (vl.plugin));
101 if (plugin_instance == NULL)
102 plugin_instance = "default";
104 ssnprintf (vl.plugin_instance, sizeof (vl.plugin_instance),
105 "%s-%s", plugin_instance, category);
107 sstrncpy (vl.type, type, sizeof (vl.type));
109 if (type_instance != NULL)
110 sstrncpy (vl.type_instance, type_instance,
111 sizeof (vl.type_instance));
113 return (plugin_dispatch_values (&vl));
114 } /* }}} int varnish_submit */
116 static int varnish_submit_gauge (const char *plugin_instance, /* {{{ */
117 const char *category, const char *type, const char *type_instance,
118 uint64_t gauge_value)
122 value.gauge = (gauge_t) gauge_value;
124 return (varnish_submit (plugin_instance, category, type, type_instance, value));
125 } /* }}} int varnish_submit_gauge */
127 static int varnish_submit_derive (const char *plugin_instance, /* {{{ */
128 const char *category, const char *type, const char *type_instance,
129 uint64_t derive_value)
133 value.derive = (derive_t) derive_value;
135 return (varnish_submit (plugin_instance, category, type, type_instance, value));
136 } /* }}} int varnish_submit_derive */
139 static void varnish_monitor (const user_config_t *conf, /* {{{ */
140 const c_varnish_stats_t *stats)
142 if (conf->collect_cache)
145 varnish_submit_derive (conf->instance, "cache", "cache_result", "hit", stats->cache_hit);
147 varnish_submit_derive (conf->instance, "cache", "cache_result", "miss", stats->cache_miss);
148 /* Cache hits for pass */
149 varnish_submit_derive (conf->instance, "cache", "cache_result", "hitpass", stats->cache_hitpass);
152 if (conf->collect_connections)
154 /* Client connections accepted */
155 varnish_submit_derive (conf->instance, "connections", "connections", "accepted", stats->client_conn);
156 /* Connection dropped, no sess */
157 varnish_submit_derive (conf->instance, "connections", "connections", "dropped" , stats->client_drop);
158 /* Client requests received */
159 varnish_submit_derive (conf->instance, "connections", "connections", "received", stats->client_req);
162 if (conf->collect_esi)
164 /* ESI parse errors (unlock) */
165 varnish_submit_derive (conf->instance, "esi", "total_operations", "error", stats->esi_errors);
166 /* Objects ESI parsed (unlock) */
167 varnish_submit_derive (conf->instance, "esi", "total_operations", "parsed", stats->esi_parse);
170 if (conf->collect_backend)
172 /* Backend conn. success */
173 varnish_submit_derive (conf->instance, "backend", "connections", "success" , stats->backend_conn);
174 /* Backend conn. not attempted */
175 varnish_submit_derive (conf->instance, "backend", "connections", "not-attempted", stats->backend_unhealthy);
176 /* Backend conn. too many */
177 varnish_submit_derive (conf->instance, "backend", "connections", "too-many" , stats->backend_busy);
178 /* Backend conn. failures */
179 varnish_submit_derive (conf->instance, "backend", "connections", "failures" , stats->backend_fail);
180 /* Backend conn. reuses */
181 varnish_submit_derive (conf->instance, "backend", "connections", "reuses" , stats->backend_reuse);
182 /* Backend conn. was closed */
183 varnish_submit_derive (conf->instance, "backend", "connections", "was-closed" , stats->backend_toolate);
184 /* Backend conn. recycles */
185 varnish_submit_derive (conf->instance, "backend", "connections", "recycled" , stats->backend_recycle);
186 /* Backend conn. unused */
187 varnish_submit_derive (conf->instance, "backend", "connections", "unused" , stats->backend_unused);
188 /* Backend requests mades */
189 varnish_submit_derive (conf->instance, "backend", "http_requests", "requests" , stats->backend_req);
191 varnish_submit_gauge (conf->instance, "backend", "backends", "n_backends" , stats->n_backend);
194 if (conf->collect_fetch)
197 varnish_submit_derive (conf->instance, "fetch", "http_requests", "head" , stats->fetch_head);
198 /* Fetch with length */
199 varnish_submit_derive (conf->instance, "fetch", "http_requests", "length" , stats->fetch_length);
201 varnish_submit_derive (conf->instance, "fetch", "http_requests", "chunked" , stats->fetch_chunked);
203 varnish_submit_derive (conf->instance, "fetch", "http_requests", "eof" , stats->fetch_eof);
204 /* Fetch bad headers */
205 varnish_submit_derive (conf->instance, "fetch", "http_requests", "bad_headers", stats->fetch_bad);
206 /* Fetch wanted close */
207 varnish_submit_derive (conf->instance, "fetch", "http_requests", "close" , stats->fetch_close);
208 /* Fetch pre HTTP/1.1 closed */
209 varnish_submit_derive (conf->instance, "fetch", "http_requests", "oldhttp" , stats->fetch_oldhttp);
211 varnish_submit_derive (conf->instance, "fetch", "http_requests", "zero" , stats->fetch_zero);
213 varnish_submit_derive (conf->instance, "fetch", "http_requests", "failed" , stats->fetch_failed);
216 if (conf->collect_hcb)
218 /* HCB Lookups without lock */
219 varnish_submit_derive (conf->instance, "hcb", "cache_operation", "lookup_nolock", stats->hcb_nolock);
220 /* HCB Lookups with lock */
221 varnish_submit_derive (conf->instance, "hcb", "cache_operation", "lookup_lock", stats->hcb_lock);
223 varnish_submit_derive (conf->instance, "hcb", "cache_operation", "insert", stats->hcb_insert);
226 if (conf->collect_objects)
228 /* N expired objects */
229 varnish_submit_derive (conf->instance, "objects", "total_objects", "expired", stats->n_expired);
230 /* N LRU nuked objects */
231 varnish_submit_derive (conf->instance, "objects", "total_objects", "lru_nuked", stats->n_lru_nuked);
232 /* N LRU saved objects */
233 varnish_submit_derive (conf->instance, "objects", "total_objects", "lru_saved", stats->n_lru_saved);
234 /* N LRU moved objects */
235 varnish_submit_derive (conf->instance, "objects", "total_objects", "lru_moved", stats->n_lru_moved);
236 /* N objects on deathrow */
237 varnish_submit_derive (conf->instance, "objects", "total_objects", "deathrow", stats->n_deathrow);
238 /* HTTP header overflows */
239 varnish_submit_derive (conf->instance, "objects", "total_objects", "header_overflow", stats->losthdr);
240 /* Objects sent with sendfile */
241 varnish_submit_derive (conf->instance, "objects", "total_objects", "sent_sendfile", stats->n_objsendfile);
242 /* Objects sent with write */
243 varnish_submit_derive (conf->instance, "objects", "total_objects", "sent_write", stats->n_objwrite);
244 /* Objects overflowing workspace */
245 varnish_submit_derive (conf->instance, "objects", "total_objects", "workspace_overflow", stats->n_objoverflow);
248 if (conf->collect_purge)
250 /* N total active purges */
251 varnish_submit_derive (conf->instance, "purge", "total_operations", "total", stats->n_purge);
252 /* N new purges added */
253 varnish_submit_derive (conf->instance, "purge", "total_operations", "added", stats->n_purge_add);
254 /* N old purges deleted */
255 varnish_submit_derive (conf->instance, "purge", "total_operations", "deleted", stats->n_purge_retire);
256 /* N objects tested */
257 varnish_submit_derive (conf->instance, "purge", "total_operations", "objects_tested", stats->n_purge_obj_test);
258 /* N regexps tested against */
259 varnish_submit_derive (conf->instance, "purge", "total_operations", "regexps_tested", stats->n_purge_re_test);
260 /* N duplicate purges removed */
261 varnish_submit_derive (conf->instance, "purge", "total_operations", "duplicate", stats->n_purge_dups);
264 if (conf->collect_session)
267 varnish_submit_derive (conf->instance, "session", "total_operations", "closed", stats->sess_closed);
268 /* Session Pipeline */
269 varnish_submit_derive (conf->instance, "session", "total_operations", "pipeline", stats->sess_pipeline);
270 /* Session Read Ahead */
271 varnish_submit_derive (conf->instance, "session", "total_operations", "readahead", stats->sess_readahead);
273 varnish_submit_derive (conf->instance, "session", "total_operations", "linger", stats->sess_linger);
275 varnish_submit_derive (conf->instance, "session", "total_operations", "herd", stats->sess_herd);
278 if (conf->collect_shm)
281 varnish_submit_derive (conf->instance, "shm", "total_operations", "records" , stats->shm_records);
283 varnish_submit_derive (conf->instance, "shm", "total_operations", "writes" , stats->shm_writes);
284 /* SHM flushes due to overflow */
285 varnish_submit_derive (conf->instance, "shm", "total_operations", "flushes" , stats->shm_flushes);
286 /* SHM MTX contention */
287 varnish_submit_derive (conf->instance, "shm", "total_operations", "contention", stats->shm_cont);
288 /* SHM cycles through buffer */
289 varnish_submit_derive (conf->instance, "shm", "total_operations", "cycles" , stats->shm_cycles);
292 if (conf->collect_sm)
294 /* allocator requests */
295 varnish_submit_derive (conf->instance, "sm", "total_requests", "nreq", stats->sm_nreq);
296 /* outstanding allocations */
297 varnish_submit_gauge (conf->instance, "sm", "requests", "outstanding", stats->sm_nobj);
298 /* bytes allocated */
299 varnish_submit_derive (conf->instance, "sm", "total_bytes", "allocated", stats->sm_balloc);
301 varnish_submit_derive (conf->instance, "sm", "total_bytes", "free", stats->sm_bfree);
304 if (conf->collect_sma)
306 /* SMA allocator requests */
307 varnish_submit_derive (conf->instance, "sma", "total_requests", "nreq", stats->sma_nreq);
308 /* SMA outstanding allocations */
309 varnish_submit_gauge (conf->instance, "sma", "requests", "outstanding", stats->sma_nobj);
310 /* SMA outstanding bytes */
311 varnish_submit_gauge (conf->instance, "sma", "bytes", "outstanding", stats->sma_nbytes);
312 /* SMA bytes allocated */
313 varnish_submit_derive (conf->instance, "sma", "total_bytes", "allocated", stats->sma_balloc);
315 varnish_submit_derive (conf->instance, "sma", "total_bytes", "free" , stats->sma_bfree);
318 if (conf->collect_sms)
320 /* SMS allocator requests */
321 varnish_submit_derive (conf->instance, "sms", "total_requests", "allocator", stats->sms_nreq);
322 /* SMS outstanding allocations */
323 varnish_submit_gauge (conf->instance, "sms", "requests", "outstanding", stats->sms_nobj);
324 /* SMS outstanding bytes */
325 varnish_submit_gauge (conf->instance, "sms", "bytes", "outstanding", stats->sms_nbytes);
326 /* SMS bytes allocated */
327 varnish_submit_derive (conf->instance, "sms", "total_bytes", "allocated", stats->sms_balloc);
328 /* SMS bytes freed */
329 varnish_submit_derive (conf->instance, "sms", "total_bytes", "free", stats->sms_bfree);
332 if (conf->collect_struct)
334 /* N struct sess_mem */
335 varnish_submit_gauge (conf->instance, "struct", "current_sessions", "sess_mem", stats->n_sess_mem);
337 varnish_submit_gauge (conf->instance, "struct", "current_sessions", "sess", stats->n_sess);
338 /* N struct object */
339 varnish_submit_gauge (conf->instance, "struct", "objects", "object", stats->n_object);
340 /* N struct objecthead */
341 varnish_submit_gauge (conf->instance, "struct", "objects", "objecthead", stats->n_objecthead);
343 varnish_submit_gauge (conf->instance, "struct", "objects", "smf", stats->n_smf);
344 /* N small free smf */
345 varnish_submit_gauge (conf->instance, "struct", "objects", "smf_frag", stats->n_smf_frag);
346 /* N large free smf */
347 varnish_submit_gauge (conf->instance, "struct", "objects", "smf_large", stats->n_smf_large);
348 /* N struct vbe_conn */
349 varnish_submit_gauge (conf->instance, "struct", "objects", "vbe_conn", stats->n_vbe_conn);
352 if (conf->collect_totals)
355 varnish_submit_derive (conf->instance, "totals", "total_sessions", "sessions", stats->s_sess);
357 varnish_submit_derive (conf->instance, "totals", "total_requests", "requests", stats->s_req);
359 varnish_submit_derive (conf->instance, "totals", "total_operations", "pipe", stats->s_pipe);
361 varnish_submit_derive (conf->instance, "totals", "total_operations", "pass", stats->s_pass);
363 varnish_submit_derive (conf->instance, "totals", "total_operations", "fetches", stats->s_fetch);
364 /* Total header bytes */
365 varnish_submit_derive (conf->instance, "totals", "total_bytes", "header-bytes", stats->s_hdrbytes);
366 /* Total body byte */
367 varnish_submit_derive (conf->instance, "totals", "total_bytes", "body-bytes", stats->s_bodybytes);
370 if (conf->collect_vcl)
373 varnish_submit_gauge (conf->instance, "vcl", "vcl", "total_vcl", stats->n_vcl);
374 /* N vcl available */
375 varnish_submit_gauge (conf->instance, "vcl", "vcl", "avail_vcl", stats->n_vcl_avail);
376 /* N vcl discarded */
377 varnish_submit_gauge (conf->instance, "vcl", "vcl", "discarded_vcl", stats->n_vcl_discard);
380 if (conf->collect_workers)
383 varnish_submit_gauge (conf->instance, "workers", "threads", "worker", stats->n_wrk);
384 /* worker threads created */
385 varnish_submit_derive (conf->instance, "workers", "total_threads", "created", stats->n_wrk_create);
386 /* worker threads not created */
387 varnish_submit_derive (conf->instance, "workers", "total_threads", "failed", stats->n_wrk_failed);
388 /* worker threads limited */
389 varnish_submit_derive (conf->instance, "workers", "total_threads", "limited", stats->n_wrk_max);
390 /* dropped work requests */
391 varnish_submit_derive (conf->instance, "workers", "total_threads", "dropped", stats->n_wrk_drop);
392 /* queued work requests */
393 varnish_submit_derive (conf->instance, "workers", "total_requests", "queued", stats->n_wrk_queue);
394 /* overflowed work requests */
395 varnish_submit_derive (conf->instance, "workers", "total_requests", "overflowed", stats->n_wrk_overflow);
398 } /* }}} void varnish_monitor */
401 #if HAVE_VARNISH_V3 || HAVE_VARNISH_V4
402 static int varnish_read (user_data_t *ud) /* {{{ */
405 const c_varnish_stats_t *stats;
409 if ((ud == NULL) || (ud->data == NULL))
419 if (conf->instance != NULL)
423 status = VSM_n_Arg (vd, conf->instance);
427 ERROR ("varnish plugin: VSM_n_Arg (\"%s\") failed "
429 conf->instance, status);
435 if (VSC_Open (vd, /* diag = */ 1))
436 #else /* if HAVE_VARNISH_V4 */
441 ERROR ("varnish plugin: Unable to open connection.");
447 stats = VSC_Main(vd);
448 #else /* if HAVE_VARNISH_V4 */
449 stats = VSC_Main(vd, NULL);
454 ERROR ("varnish plugin: Unable to get statistics.");
460 varnish_monitor (conf, stats);
465 #else /* if HAVE_VARNISH_V2 */
466 static int varnish_read (user_data_t *ud) /* {{{ */
468 const c_varnish_stats_t *stats;
472 if ((ud == NULL) || (ud->data == NULL))
477 stats = VSL_OpenStats (conf->instance);
480 ERROR ("Varnish plugin : unable to load statistics");
485 varnish_monitor (conf, stats);
491 static void varnish_config_free (void *ptr) /* {{{ */
493 user_config_t *conf = ptr;
498 sfree (conf->instance);
502 static int varnish_config_apply_default (user_config_t *conf) /* {{{ */
507 conf->collect_backend = 1;
508 conf->collect_cache = 1;
509 conf->collect_connections = 1;
510 #ifdef HAVE_VARNISH_V3
511 conf->collect_dirdns = 0;
513 conf->collect_esi = 0;
514 conf->collect_fetch = 0;
515 conf->collect_hcb = 0;
516 conf->collect_objects = 0;
518 conf->collect_purge = 0;
520 conf->collect_ban = 0;
522 conf->collect_session = 0;
523 conf->collect_shm = 1;
525 conf->collect_sm = 0;
526 conf->collect_sma = 0;
528 conf->collect_sms = 0;
529 conf->collect_struct = 0;
530 conf->collect_totals = 0;
531 #if HAVE_VARNISH_V3 || HAVE_VARNISH_V4
532 conf->collect_uptime = 0;
534 conf->collect_vcl = 0;
535 conf->collect_workers = 0;
537 conf->collect_vsm = 0;
541 } /* }}} int varnish_config_apply_default */
543 static int varnish_init (void) /* {{{ */
551 conf = malloc (sizeof (*conf));
554 memset (conf, 0, sizeof (*conf));
556 /* Default settings: */
557 conf->instance = NULL;
559 varnish_config_apply_default (conf);
562 ud.free_func = varnish_config_free;
564 plugin_register_complex_read (/* group = */ "varnish",
565 /* name = */ "varnish/localhost",
566 /* callback = */ varnish_read,
567 /* interval = */ NULL,
568 /* user data = */ &ud);
571 } /* }}} int varnish_init */
573 static int varnish_config_instance (const oconfig_item_t *ci) /* {{{ */
577 char callback_name[DATA_MAX_NAME_LEN];
580 conf = malloc (sizeof (*conf));
583 memset (conf, 0, sizeof (*conf));
584 conf->instance = NULL;
586 varnish_config_apply_default (conf);
588 if (ci->values_num == 1)
592 status = cf_util_get_string (ci, &conf->instance);
598 assert (conf->instance != NULL);
600 if (strcmp ("localhost", conf->instance) == 0)
602 sfree (conf->instance);
603 conf->instance = NULL;
606 else if (ci->values_num > 1)
608 WARNING ("Varnish plugin: \"Instance\" blocks accept only "
613 for (i = 0; i < ci->children_num; i++)
615 oconfig_item_t *child = ci->children + i;
617 if (strcasecmp ("CollectCache", child->key) == 0)
618 cf_util_get_boolean (child, &conf->collect_cache);
619 else if (strcasecmp ("CollectConnections", child->key) == 0)
620 cf_util_get_boolean (child, &conf->collect_connections);
621 else if (strcasecmp ("CollectESI", child->key) == 0)
622 cf_util_get_boolean (child, &conf->collect_esi);
623 #ifdef HAVE_VARNISH_V3
624 else if (strcasecmp ("CollectDirectorDNS", child->key) == 0)
625 cf_util_get_boolean (child, &conf->collect_dirdns);
627 else if (strcasecmp ("CollectBackend", child->key) == 0)
628 cf_util_get_boolean (child, &conf->collect_backend);
629 else if (strcasecmp ("CollectFetch", child->key) == 0)
630 cf_util_get_boolean (child, &conf->collect_fetch);
631 else if (strcasecmp ("CollectHCB", child->key) == 0)
632 cf_util_get_boolean (child, &conf->collect_hcb);
633 else if (strcasecmp ("CollectObjects", child->key) == 0)
634 cf_util_get_boolean (child, &conf->collect_objects);
636 else if (strcasecmp ("CollectPurge", child->key) == 0)
637 cf_util_get_boolean (child, &conf->collect_purge);
639 else if (strcasecmp ("CollectBan", child->key) == 0)
640 cf_util_get_boolean (child, &conf->collect_ban);
642 else if (strcasecmp ("CollectSession", child->key) == 0)
643 cf_util_get_boolean (child, &conf->collect_session);
644 else if (strcasecmp ("CollectSHM", child->key) == 0)
645 cf_util_get_boolean (child, &conf->collect_shm);
646 else if (strcasecmp ("CollectSMS", child->key) == 0)
647 cf_util_get_boolean (child, &conf->collect_sms);
649 else if (strcasecmp ("CollectSMA", child->key) == 0)
650 cf_util_get_boolean (child, &conf->collect_sma);
651 else if (strcasecmp ("CollectSM", child->key) == 0)
652 cf_util_get_boolean (child, &conf->collect_sm);
654 else if (strcasecmp ("CollectStruct", child->key) == 0)
655 cf_util_get_boolean (child, &conf->collect_struct);
656 else if (strcasecmp ("CollectTotals", child->key) == 0)
657 cf_util_get_boolean (child, &conf->collect_totals);
658 #if HAVE_VARNISH_V3 || HAVE_VARNISH_V4
659 else if (strcasecmp ("CollectUptime", child->key) == 0)
660 cf_util_get_boolean (child, &conf->collect_uptime);
662 else if (strcasecmp ("CollectVCL", child->key) == 0)
663 cf_util_get_boolean (child, &conf->collect_vcl);
664 else if (strcasecmp ("CollectWorkers", child->key) == 0)
665 cf_util_get_boolean (child, &conf->collect_workers);
667 else if (strcasecmp ("CollectVSM", child->key) == 0)
668 cf_util_get_boolean (child, &conf->collect_vsm);
672 WARNING ("Varnish plugin: Ignoring unknown "
673 "configuration option: \"%s\". Did "
674 "you forget to add an <Instance /> "
675 "block around the configuration?",
680 if (!conf->collect_cache
681 && !conf->collect_connections
682 && !conf->collect_esi
683 && !conf->collect_backend
684 #ifdef HAVE_VARNISH_V3
685 && !conf->collect_dirdns
687 && !conf->collect_fetch
688 && !conf->collect_hcb
689 && !conf->collect_objects
691 && !conf->collect_purge
693 && !conf->collect_ban
695 && !conf->collect_session
696 && !conf->collect_shm
697 && !conf->collect_sms
699 && !conf->collect_sma
702 && !conf->collect_struct
703 && !conf->collect_totals
704 #if HAVE_VARNISH_V3 || HAVE_VARNISH_V4
705 && !conf->collect_uptime
707 && !conf->collect_vcl
708 && !conf->collect_workers
710 && !conf->collect_vsm
714 WARNING ("Varnish plugin: No metric has been configured for "
715 "instance \"%s\". Disabling this instance.",
716 (conf->instance == NULL) ? "localhost" : conf->instance);
720 ssnprintf (callback_name, sizeof (callback_name), "varnish/%s",
721 (conf->instance == NULL) ? "localhost" : conf->instance);
724 ud.free_func = varnish_config_free;
726 plugin_register_complex_read (/* group = */ "varnish",
727 /* name = */ callback_name,
728 /* callback = */ varnish_read,
729 /* interval = */ NULL,
730 /* user data = */ &ud);
735 } /* }}} int varnish_config_instance */
737 static int varnish_config (oconfig_item_t *ci) /* {{{ */
741 for (i = 0; i < ci->children_num; i++)
743 oconfig_item_t *child = ci->children + i;
745 if (strcasecmp ("Instance", child->key) == 0)
746 varnish_config_instance (child);
749 WARNING ("Varnish plugin: Ignoring unknown "
750 "configuration option: \"%s\"",
756 } /* }}} int varnish_config */
758 void module_register (void) /* {{{ */
760 plugin_register_complex_config ("varnish", varnish_config);
761 plugin_register_init ("varnish", varnish_init);
764 /* vim: set sw=8 noet fdm=marker : */