Professional Documents
Culture Documents
teamix GmbH
Solid IT-Infrastructure
Location: Nuremberg, Munich, Frankfurt
Open-Source
Monitoring
Network
N-IX
NetApp
Juniper
Riverbed
VMWare
Trainings
collectd slide 2
collectd Overview
Overview
Main Features
Feature Overview
Extending collectd
Extras
collectd slide 3
collectd overview
collectd slide 4
Main features
daemon
free software (mostly GPL)
portable (Linux, *BSD, Solaris, . . . )
scalable (OpenWrt, . . . , Cluster / Cloud)
sophisticated network support
efficient (default resolution: 10 seconds)
flexible architecture
modular (more than 100 plugins in Version 5.1)
collectd slide 5
Main features
daemon
free software (mostly GPL)
portable (Linux, *BSD, Solaris, . . . )
scalable (OpenWrt, . . . , Cluster / Cloud)
sophisticated network support
efficient (default resolution: 10 seconds)
flexible architecture
modular (more than 100 plugins in Version 5.1)
collectd slide 5
10 seconds resolution
collectd slide 6
Main features
daemon
free software (mostly GPL)
portable (Linux, *BSD, Solaris, . . . )
scalable (OpenWrt, . . . , Cluster / Cloud)
sophisticated network support
efficient (default resolution: 10 seconds)
flexible architecture
modular (more than 100 plugins in version 5.1)
collectd slide 7
apache
bind
csv
df
ethstat
gmond
ipvs
logfile
match regex
memcachec
multimeter
nfs
numa
OpenVZ.pm
postgresql
redis
serial
tail
target set
thermal
users
wireless
xmms
apcups
conntrack
curl
disk
exec
hddtemp
irq
lpar
match timediff
memcached
mysql
nginx
nut
oracle
powerdns
routeros
snmp
tape
target v5upgrade
threshold
uuid
write graphite
zfs arc
apple sensors
contextswitch
curl json
dns
filecount
interface
java
madwifi
match value
memory
netapp
notify desktop
olsrd
perl
processes
rrdcached
swap
target notification
tcpconns
tokyotyrant
varnish
write http
ascent
cpu
curl xml
email
fscache
ipmi
libvirt
match empty counter
mbmon
modbus
netlink
notify email
onewire
pinba
protocols
rrdtool
syslog
target replace
teamspeak2
unixsock
vmem
write mongodb
collectd slide 8
collectd setup
enjoy ;-)
collectd slide 9
collectd slide 10
collectd slide 11
collectd Overview
Feature Overview
CPU, memory, network I/O
Networking Support
RRDtool Support
Generic Plugins (Overview)
Extending collectd
Extras
collectd slide 12
plugin overview
collectd slide 13
configuration synopsis
LoadPlugin "cpu"
LoadPlugin "memory"
LoadPlugin "interface"
collectd slide 14
configuration synopsis
LoadPlugin "cpu"
LoadPlugin "memory"
LoadPlugin "interface"
<Plugin interface>
Interface lo
Interface sit0
IgnoreSelected true
</Plugin>
collectd slide 14
collectd slide 15
collectd slide 16
collectd slide 17
Networking Support
modes of operation
send data (client)
receive data (server)
forward data (proxy)
Unicast (point-to-point)
Multicast (point-to-group)
IPv4 and IPv6
collectd slide 18
synopsis: client
LoadPlugin "network"
<Plugin "network">
Server "collectd0.example.com"
Server "collectd1.example.com"
Server "ff18::efc0:4a42"
</Plugin>
collectd slide 19
synopsis: server
LoadPlugin "network"
<Plugin "network">
Listen "collectd0.example.com"
Listen "ff18::efc0:4a42"
</Plugin>
collectd slide 20
synopsis: proxy
LoadPlugin "network"
<Plugin "network">
Listen "collectgw.extern.example.com"
Server "collectd1.intern.example.com"
Forward true
</Plugin>
collectd slide 21
RRDtool plugin
synopsis
LoadPlugin "rrdtool"
<Plugin "rrdtool">
DataDir "/var/lib/collectd/rrd"
</Plugin>
collectd slide 22
configuration synopsis
<Plugin "rrdtool">
DataDir "/var/lib/collectd/rrd"
CacheTimeout 3600
CacheFlush 86400
# 1 hour
# 1 day
WritesPerSecond 30
</Plugin>
FLUSH command allows for graphing of current values
c 2012 Sebastian Harl, CC-BY-SA
collectd slide 23
collectd slide 24
collectd slide 25
collectd slide 26
collectd Overview
Feature Overview
Extending collectd
UNIXSOCK interface
Custom Extensions
Extras
collectd slide 27
collectd slide 28
UNIXSOCK plugin
opens a UNIX socket
text and line based protocol
(e. g. PUTVAL, FLUSH, LISTVAL, GETVAL)
query and submit values
collectd-nagios
collectdctl (since version 5.0)
cussh.pl: collectd UNIX socket shell
collectd slide 29
->
<<<<-
|
|
|
|
|
GETVAL "FQDN/load/load"
3 Values found
shortterm=4.000000e-02
midterm=6.000000e-02
longterm=7.000000e-02
collectd slide 30
Perl plugin
overview
integrates a Perl interpreter
(similar to Apaches mod perl)
compiles Perl code only once
exports internal API
( full flexibility available)
also available
Java and Python
collectd slide 31
exec plugin
overview
executes arbitrary programs / scripts
parses STDOUT of the program
respawns process upon termination
(cf. init)
collectd slide 32
#! /bin/bash
INTVL=${COLLECTD_INTERVAL:-10}
CHOST="${COLLECTD_HOSTNAME:-localhost}"
IDENT="$CHOST/magic/magic_level"
while sleep $INTVL
do
V=magic --level
echo "PUTVAL \"$IDENT\" interval=$INTVL date +%s:$V"
done
collectd slide 33
Future
http://collectd.org/wiki/index.php/Roadmap
collectd slide 34
collectd
Questions?
collectd slide 35
collectd
Contact:
Sebastian tokkee Harl
teamix GmbH, Nuremberg
<sh@teamix.net>
<collectd@verplant.org> irc.freenode.net/#collectd http://identi.ca/collectd
http://tokkee.org/events.html
collectd slide 36
collectd Overview
Feature Overview
Extending collectd
Extras
SNMP plugin
RRDCacheD Plugin
collectd Internals
Perl Plugin
collectd slide 37
SNMP plugin
overview
queries network equipment via SNMP
generic: not specialized for any particular hardware
queries multiple systems in parallel
configuration
Data Block
Host block
collectd slide 38
SNMP plugin
collectd slide 39
SNMP plugin
collectd slide 40
RRDCacheD plugin
overview
generalizes caching idea of the rrdtool plugin
standalone daemon
integrated into RRDtool (available since version 1.4)
extended feature set, e. g. journal
benefit: restart collectd without losing cache
collectd slide 41
Suchbaum
RRDCacheD plugin
collectd slide 42
Suchbaum
RRDCacheD plugin
collectd slide 42
Thread
Dateisystem
Queue
Update-
Suchbaum
Update-
RRDCacheD plugin
collectd slide 42
Thread
Dateisystem
Flush-Queue
Queue
Update-
Suchbaum
Update-
RRDCacheD plugin
collectd slide 42
collectd internals
core:
read thread()
collectd slide 43
collectd internals
core:
read thread()
plugin1.c:read()
p->callback();
collectd slide 43
collectd internals
plugin1.c:read()
...
dispatch values(v);
collectd slide 43
collectd internals
core:
dispatch values()
plugin1.c:read()
...
plugin write(v);
...
dispatch values(v);
collectd slide 43
collectd internals
core:
dispatch values()
plugin1.c:read()
plugin2.c:write()
...
plugin write(v);
...
dispatch values(v);
...
collectd slide 43
package Collectd::Plugin::Magic;
use Collectd qw( :all );
sub magic_read
{
my $vl = { plugin => magic,
values => [Magic->getCurrentLevel ()] };
plugin_dispatch_values (magic_level, $vl);
}
plugin_register (TYPE_READ, magic, magic_read);
collectd slide 44