[collectd] Can't get the memcachec plugin to work

Rodion Vynnychenko roddiku at gmail.com
Fri Jun 15 19:02:23 CEST 2012

I'm trying to use the `memcachec` plugin to read data from the memcached,
but when I'm using this config:

    <Plugin "memcachec">
      <Page "plugin_instance">
        Key "KEY1"
        Server "localhost"

I'm getting `memcachec plugin: Option 'server' not allowed here.`, if I
remove the server option I get `memcachec plugin: 'Server' missing in
'Page' block.`. I've checked the sources of memcachec and there's this code
(memcachec.c, line 329):

    if (strcasecmp ("Server", child->key) == 0)
      status = cmc_config_add_string ("Server", &page->server, child);
    if (strcasecmp ("Key", child->key) == 0)
      status = cmc_config_add_string ("Key", &page->key, child);
    else if (strcasecmp ("Match", child->key) == 0)
      /* Be liberal with failing matches => don't set `status'. */
      cmc_config_add_match (page, child);
      WARNING ("memcachec plugin: Option `%s' not allowed here.",
      status = -1;

It seems like the second `if` should have been `else if` for the plugin to
work. Is this a bug?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20120615/cfa15b34/attachment-0001.html>

More information about the collectd mailing list