retitle 632713 collectd: please support unquoted IPv6 addresses in the config as well severity 632713 wishlist thanks
Hi, thanks for reporting this! With the above lines, I've changed this bug report to a feature request to support (unquoted) IPv6 addresses in the config file as well. For details see below. On Tue, Jul 05, 2011 at 07:40:28PM +1000, Geoff Crompton wrote: > If I have a /etc/collectd/plugins/ping.conf file such as: > <Plugin ping> > Host 150.101.140.197 > Host 2001:44b8:69:2:1::100 > </Plugin> > > Then when I start collectd I get log lines like: > Jul 5 18:05:13 ogrady collectd[18720]: ping plugin: ping_host_add > (2001.000000 44b8 69.000000 2.000000 1.000000 100.000000) failed: getaddrinfo: > Name or service not known liboconfig (and collectd) handles IP addresses as strings. So you can fix that error by using: Host "2001:44b8:69:2:1::100" In the case of IPv4 addresses, the liboconfig lexer (src/liboconfig/ scanner.l) supports unquoted addresses as well (see lines 60 and 75), so having those in your config works fine. > Furthermore, if I changed the second Host line to '::1', I don't get these > errnoeous log lines. Interesting, I would expect a parse error in that case. Anyway, I think that it would be nice to handle IPv4/v6 addresses alike, so "special code" to parse unquoted IPv6 addresses should be added to liboconfig. For now, just use quoted strings to fix your problem. HTH, Sebastian -- Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/ Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin
signature.asc
Description: Digital signature