[collectd] Config changes

Mirko Buffoni briareos at eswat.org
Fri Sep 18 12:39:38 CEST 2009


Hi all,

This is rather long, sorry for this.

A few things about config file:

1.

I noticed that 'LoadPlugin vserver' directive is not present anymore in
collectd.conf, though the plugin is compiled.  No trace of
removal in the changelog has been found. Is this correct?

2.

Couchdb is missing 'LoadPlugin couchdb' directive in collectd.conf header.

3.

Generated collectd.conf is missing additional parameter for dns

#<Plugin dns>
#	SelectNumericQueryTypes true
#</Plugin>

4.

#<Plugin http>
#	URL "http://example.com/collectd-import"
#	User "www-user"
#	Password "secret"
#</Plugin>

I cannot find which plugin is this for.  Leftover of write_http?

5.

This is a proposal.  I went through all plugins and created a different
config file layout:

collectd.d
|-- database
|   |-- couchdb.conf
|   |-- dbi.conf
|   |-- mysql.conf
|   |-- oracle.conf
|   |-- postgresql.conf
|   |-- table.conf
|   `-- tokyotyrant.conf
|-- dns
|   |-- bind.conf
|   |-- dns.conf
|   `-- powerdns.conf
|-- logging
|   |-- logfile.conf
|   |-- syslog.conf
|   `-- uuid.conf
|-- network
|   |-- conntrack.conf
|   |-- interface.conf
|   |-- iptables.conf
|   |-- ipvs.conf
|   |-- netlink.conf
|   |-- network.conf
|   |-- nfs.conf
|   |-- openvpn.conf
|   |-- oslrd.conf
|   |-- ping.conf
|   |-- protocols.conf
|   |-- snmp.conf
|   |-- tcpconns.conf
|   |-- teamspeak2.conf
|   `-- wireless.conf
|-- output
|   |-- csv.conf
|   |-- email.conf
|   |-- notify_desktop.conf
|   |-- notify_email.conf
|   |-- perl.conf
|   |-- rrdcached.conf
|   |-- rrdtool.conf
|   |-- unixsock.conf
|   `-- write_http.conf
|-- sensors
|   |-- apple_sensors.conf
|   |-- hddtemp.conf
|   |-- ipmi.conf
|   |-- mbmon.conf
|   |-- multimeter.conf
|   |-- onewire.conf
|   |-- sensors.conf
|   |-- ted.conf
|   `-- thermal.conf
|-- storage
|   |-- df.conf
|   |-- disk.conf
|   |-- filecount.conf
|   |-- fscache.conf
|   |-- tape.conf
|   `-- zfs_arc.conf
|-- system
|   |-- cpu.conf
|   |-- entropy.conf
|   |-- exec.conf
|   |-- gmond.conf
|   |-- irq.conf
|   |-- java.conf
|   |-- libvirt.conf
|   |-- load.conf
|   |-- memcachec.conf
|   |-- memcached.conf
|   |-- memory.conf
|   |-- ntpd.conf
|   |-- processes.conf
|   |-- serial.conf
|   |-- swap.conf
|   |-- tail.conf
|   |-- uptime.conf
|   |-- users.conf
|   |-- vmem.conf
|   `-- vserver.conf
|-- ups
|   |-- apcups.conf
|   |-- battery.conf
|   `-- nut.conf
|-- webservers
|   |-- apache.conf
|   |-- ascent.conf
|   |-- curl.conf
|   |-- curl_json.conf
|   `-- nginx.conf
`-- xmms.conf

The collectd.conf file is simplified and contain only the basic plugins:

##############################################################################
# Global                                                                     #
#----------------------------------------------------------------------------#
# Global settings for the daemon.                                            #
##############################################################################
#Hostname    "localhost"
FQDNLookup   true
BaseDir     "/var/lib/collectd"
PIDFile     "/var/run/collectd.pid"
PluginDir   "/usr/lib/collectd"
TypesDB     "/usr/share/collectd/types.db"
Interval     15
ReadThreads  5

##############################################################################
# Logging                                                                    #
#----------------------------------------------------------------------------#
# Plugins which provide logging functions should be loaded first, so log     #
# messages generated when loading or configuring other plugins can be        #
# accessed.                                                                  #
##############################################################################
LoadPlugin syslog
#<Plugin syslog>
#	LogLevel info
#</Plugin>
#LoadPlugin logfile
#<Plugin logfile>
#	LogLevel debug
#	File STDOUT
#	File "/tmp/collect.log"
#	Timestamp true
#</Plugin>

##############################################################################
# LoadPlugin section                                                         #
#----------------------------------------------------------------------------#
# Lines beginning with a single `#' belong to plugins which have been built  #
# but are disabled by default.                                               #
#                                                                            #
# Lines begnning with `##' belong to plugins which have not been built due   #
# to missing dependencies or because they have been deactivated explicitly.  #
##############################################################################
Include "/etc/collectd.d"

##############################################################################
# Filter configuration                                                       #
#----------------------------------------------------------------------------#
# The following configures collectd's filtering mechanism. Before changing   #
# anything in this section, please read the `FILTER CONFIGURATION' section   #
# in the collectd.conf(5) manual page.                                       #
##############################################################################
# Load required matches:
#LoadPlugin match_regex
#LoadPlugin match_value
#LoadPlugin match_timediff
# Load required targets:
#LoadPlugin target_notification
#LoadPlugin target_replace
#LoadPlugin target_set
#----------------------------------------------------------------------------#
# The following block demonstrates the default behavior if no filtering is   #
# configured at all: All values will be sent to all available write plugins. #
#----------------------------------------------------------------------------#
#<Chain "Main">
#  Target "write"
#</Chain>

While the single configuration files are like this:

LoadPlugin dns

#<Plugin dns>
#	Interface "eth0"
#	IgnoreSource "192.168.0.1"
#	SelectNumericQueryTypes true
#</Plugin>

To me this has several advantages:  plugin classification allows me to better
identify plugins based on their purpose, and also to deploy a rather 
standardized
package with more or less plugins which can be installed separately 
together with
their config file, in a separate package, when needed.

Of course the best would be to keep up-to-date the single configuration files,
hopefully with a brief description at the top of the config file, and maybe 
with
the part of the manual that summarize the parameters, as a quick reference, to
avoid to go through the manual each time.

Thoughts? Opinions?  all welcome...

Mirko




More information about the collectd mailing list