Simple configuration

These configuration are for logging performance data for Load, RAM, Disk and Network Interface of the local machine. May be used to replace basic MRTG.

The basic /etc/collectd.conf:

##############################################################################
# Global                                                                     #
#----------------------------------------------------------------------------#
# Global settings for the daemon.                                            #
##############################################################################

FQDNLookup   true
BaseDir     "/var/lib/collectd"
PIDFile     "/var/run/collectd.pid"
PluginDir   "/usr/lib/collectd"
TypesDB     "/usr/share/collectd/types.db"
Interval     10
ReadThreads  5


# program logging plugin
LoadPlugin syslog

<Plugin syslog>
        LogLevel info
</Plugin>

# data collection plugins
LoadPlugin disk
LoadPlugin interface
LoadPlugin load
LoadPlugin memory

# data saving plugin
LoadPlugin rrdtool

We need to customize the plugins a little bit to exclude data from irrelevant device.

Example, collect disk statistics for two RAID partitions /dev/md1 and /dev/md2 only, add these to the config file:

<Plugin disk>
        Disk "/^md[1-2]$/"
        IgnoreSelected false
</Plugin>

Exclude data from loopback interface:

<Plugin interface>
        Interface "lo"
        IgnoreSelected true
</Plugin>

The RRD data files will be save like this directory structure:

# tree /var/lib/collectd/
/var/lib/collectd/
`-- mail.cmsweb.com
    |-- cpu-0
    |   |-- cpu-idle.rrd
    |   |-- cpu-interrupt.rrd
    |   |-- cpu-nice.rrd
    |   |-- cpu-softirq.rrd
    |   |-- cpu-steal.rrd
    |   |-- cpu-system.rrd
    |   |-- cpu-user.rrd
    |   `-- cpu-wait.rrd
    |-- cpu-1
    |   |-- cpu-idle.rrd
    |   |-- cpu-interrupt.rrd
    |   |-- cpu-nice.rrd
    |   |-- cpu-softirq.rrd
    |   |-- cpu-steal.rrd
    |   |-- cpu-system.rrd
    |   |-- cpu-user.rrd
    |   `-- cpu-wait.rrd
    |-- disk-md1
    |   |-- disk_merged.rrd
    |   |-- disk_octets.rrd
    |   `-- disk_ops.rrd
    |-- disk-md2
    |   |-- disk_merged.rrd
    |   |-- disk_octets.rrd
    |   `-- disk_ops.rrd
    |-- interface
    |   |-- if_errors-eth0.rrd
    |   |-- if_errors-eth1.rrd
    |   |-- if_errors-tun0.rrd
    |   |-- if_octets-eth0.rrd
    |   |-- if_octets-eth1.rrd
    |   |-- if_octets-tun0.rrd
    |   |-- if_packets-eth0.rrd
    |   |-- if_packets-eth1.rrd
    |   `-- if_packets-tun0.rrd
    |-- load
    |   `-- load.rrd
    `-- memory
        |-- memory-buffered.rrd
        |-- memory-cached.rrd
        |-- memory-free.rrd
        `-- memory-used.rrd

collectd/simple_configuration_for_load_ram_disk_and_network_interface.txt · Last modified: 2010-03-14 13:55 by admin
Back to top
GNU Free Documentation License 1.3
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0