Bug#690668: collectd: Please add /etc/collectd.d/ to easily enable plugins

2012-11-24 Thread Sebastian Harl
Hi,

On Tue, Oct 16, 2012 at 11:31:17AM +0200, Laurent Bigonville wrote:
> It could be nice if you could add a "/etc/collectd.d" directory where
> the user could drop config stanza to easily enable plugins.

Sounds like a good idea to me.

> Adding Include "/etc/collectd.d/*.conf" in collectd.conf and creating
> the directory seems to work.

Well, kind of ;-) This will report an error on startup if there is no
file matching the specified pattern. This would confuse users if it was
used in the default configuration (-> everybody would get the error).

Anyway, I've created a patch adding support for recursively including
all files matching a specified pattern. In this case, no error will be
generated if there is no match. This way, I could add the following to
collectd.conf:

  Include "/etc/collectd/collectd.conf.d" "*.conf"

This would work similar to "find /etc/collectd/collectd.conf.d -name
*.conf" and include all files found this way.

See  for details.

What do you think? ;-)

Cheers,
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


Bug#690668: collectd: Please add /etc/collectd.d/ to easily enable plugins

2012-10-16 Thread Laurent Bigonville
Package: collectd
Version: 4.10.1-1
Severity: wishlist

Hi,

It could be nice if you could add a "/etc/collectd.d" directory where
the user could drop config stanza to easily enable plugins.

Adding Include "/etc/collectd.d/*.conf" in collectd.conf and creating
the directory seems to work.

Cheers

Laurent Bigonville

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.5-trunk-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_BE.utf8, LC_CTYPE=fr_BE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org