collectd plugin ordering matters. the write_graphite plugin establishes a TCP connection but there is a race between that and the df/du values that get reported. du is especially problematic since we report this only every 12 hours. so, instead we cache the values and report it every 20 seconds. on the carbon side, it will just retain every 12 hours (since that is the whisper retention period). there is also FlushInterval which I am not 100% sure has any effect. by default, the write_graphite plugin waits for 1428 bytes to be accumulated. (https://manpages.debian.org/unstable/collectd-core/collectd.conf.5.en.html) https://github.com/collectd/collectd/issues/2672 https://github.com/collectd/collectd/pull/1044 I found this syntax hidden deep inside https://www.cisco.com/c/en/us/td/docs/net_mgmt/virtual_topology_system/2_6_3/user_guide/Cisco_VTS_2_6_3_User_Guide/Cisco_VTS_2_6_1_User_Guide_chapter_01111.pdf
249 lines
7.0 KiB
Plaintext
249 lines
7.0 KiB
Plaintext
# Config file for collectd(1).
|
|
#
|
|
# Some plugins need additional configuration and are disabled by default.
|
|
# Please read collectd.conf(5) for details.
|
|
#
|
|
# You should also read /usr/share/doc/collectd-core/README.Debian.plugins
|
|
# before enabling any more plugins.
|
|
|
|
##############################################################################
|
|
# Global #
|
|
#----------------------------------------------------------------------------#
|
|
# Global settings for the daemon. #
|
|
##############################################################################
|
|
|
|
Hostname "localhost"
|
|
#FQDNLookup true
|
|
#BaseDir "/var/lib/collectd"
|
|
#PluginDir "/usr/lib/collectd"
|
|
#TypesDB "/usr/share/collectd/types.db" "/etc/collectd/my_types.db"
|
|
|
|
#----------------------------------------------------------------------------#
|
|
# When enabled, plugins are loaded automatically with the default options #
|
|
# when an appropriate <Plugin ...> block is encountered. #
|
|
# Disabled by default. #
|
|
#----------------------------------------------------------------------------#
|
|
#AutoLoadPlugin false
|
|
|
|
#----------------------------------------------------------------------------#
|
|
# Interval at which to query values. This may be overwritten on a per-plugin #
|
|
# base by using the 'Interval' option of the LoadPlugin block: #
|
|
# <LoadPlugin foo> #
|
|
# Interval 60 #
|
|
# </LoadPlugin> #
|
|
#----------------------------------------------------------------------------#
|
|
# IMPORTANT: changing this value requires a change in whisper schema as well
|
|
Interval 20
|
|
|
|
#Timeout 2
|
|
#ReadThreads 5
|
|
#WriteThreads 5
|
|
|
|
# Limit the size of the write queue. Default is no limit. Setting up a limit
|
|
# is recommended for servers handling a high volume of traffic.
|
|
#WriteQueueLimitHigh 1000000
|
|
#WriteQueueLimitLow 800000
|
|
|
|
##############################################################################
|
|
# Logging #
|
|
#----------------------------------------------------------------------------#
|
|
# Plugins which provide logging functions should be loaded first, so log #
|
|
# messages generated when loading or configuring other plugins can be #
|
|
# accessed. #
|
|
##############################################################################
|
|
|
|
LoadPlugin logfile
|
|
#LoadPlugin syslog
|
|
|
|
<Plugin logfile>
|
|
LogLevel "info"
|
|
File "/home/yellowtent/platformdata/logs/collectd/collectd.log"
|
|
Timestamp true
|
|
PrintSeverity false
|
|
</Plugin>
|
|
|
|
#<Plugin syslog>
|
|
# LogLevel info
|
|
#</Plugin>
|
|
|
|
##############################################################################
|
|
# LoadPlugin section #
|
|
#----------------------------------------------------------------------------#
|
|
# Specify what features to activate. #
|
|
##############################################################################
|
|
|
|
LoadPlugin aggregation
|
|
#LoadPlugin amqp
|
|
#LoadPlugin apache
|
|
#LoadPlugin apcups
|
|
#LoadPlugin ascent
|
|
#LoadPlugin battery
|
|
#LoadPlugin bind
|
|
#LoadPlugin cgroups
|
|
#LoadPlugin conntrack
|
|
#LoadPlugin contextswitch
|
|
LoadPlugin cpu
|
|
#LoadPlugin cpufreq
|
|
#LoadPlugin csv
|
|
#LoadPlugin curl
|
|
#LoadPlugin curl_json
|
|
#LoadPlugin curl_xml
|
|
#LoadPlugin dbi
|
|
#LoadPlugin df
|
|
#LoadPlugin disk
|
|
#LoadPlugin dns
|
|
#LoadPlugin email
|
|
#LoadPlugin entropy
|
|
#LoadPlugin ethstat
|
|
#LoadPlugin exec
|
|
#LoadPlugin filecount
|
|
#LoadPlugin fscache
|
|
#LoadPlugin gmond
|
|
#LoadPlugin hddtemp
|
|
LoadPlugin interface
|
|
#LoadPlugin ipmi
|
|
#LoadPlugin iptables
|
|
#LoadPlugin ipvs
|
|
#LoadPlugin irq
|
|
#LoadPlugin java
|
|
#LoadPlugin libvirt
|
|
LoadPlugin load
|
|
#LoadPlugin lvm
|
|
#LoadPlugin madwifi
|
|
#LoadPlugin mbmon
|
|
#LoadPlugin md
|
|
#LoadPlugin memcachec
|
|
#LoadPlugin memcached
|
|
LoadPlugin memory
|
|
#LoadPlugin modbus
|
|
#LoadPlugin multimeter
|
|
#LoadPlugin mysql
|
|
#LoadPlugin netlink
|
|
#LoadPlugin network
|
|
#LoadPlugin nfs
|
|
#LoadPlugin nginx
|
|
#LoadPlugin notify_desktop
|
|
#LoadPlugin notify_email
|
|
#LoadPlugin ntpd
|
|
#LoadPlugin numa
|
|
#LoadPlugin nut
|
|
#LoadPlugin olsrd
|
|
#LoadPlugin openvpn
|
|
#<LoadPlugin perl>
|
|
# Globals true
|
|
#</LoadPlugin>
|
|
#LoadPlugin pinba
|
|
#LoadPlugin ping
|
|
#LoadPlugin postgresql
|
|
#LoadPlugin powerdns
|
|
#LoadPlugin processes
|
|
#LoadPlugin protocols
|
|
<LoadPlugin python>
|
|
Globals true
|
|
</LoadPlugin>
|
|
#LoadPlugin rrdcached
|
|
#LoadPlugin rrdtool
|
|
#LoadPlugin sensors
|
|
#LoadPlugin serial
|
|
#LoadPlugin snmp
|
|
#LoadPlugin statsd
|
|
LoadPlugin swap
|
|
#LoadPlugin table
|
|
#LoadPlugin tail
|
|
#LoadPlugin tail_csv
|
|
#LoadPlugin tcpconns
|
|
#LoadPlugin teamspeak2
|
|
#LoadPlugin ted
|
|
#LoadPlugin thermal
|
|
#LoadPlugin tokyotyrant
|
|
#LoadPlugin unixsock
|
|
#LoadPlugin uptime
|
|
#LoadPlugin users
|
|
#LoadPlugin uuid
|
|
#LoadPlugin varnish
|
|
#LoadPlugin vmem
|
|
#LoadPlugin vserver
|
|
#LoadPlugin wireless
|
|
<LoadPlugin write_graphite>
|
|
FlushInterval 20
|
|
</LoadPlugin>
|
|
#LoadPlugin write_http
|
|
#LoadPlugin write_riemann
|
|
|
|
##############################################################################
|
|
# Plugin configuration #
|
|
#----------------------------------------------------------------------------#
|
|
# In this section configuration stubs for each plugin are provided. A desc- #
|
|
# ription of those options is available in the collectd.conf(5) manual page. #
|
|
##############################################################################
|
|
|
|
<Plugin "aggregation">
|
|
<Aggregation>
|
|
Plugin "cpu"
|
|
Type "cpu"
|
|
|
|
GroupBy "Host"
|
|
GroupBy "TypeInstance"
|
|
|
|
CalculateNum false
|
|
CalculateSum true
|
|
CalculateAverage true
|
|
CalculateMinimum false
|
|
CalculateMaximum true
|
|
CalculateStddev false
|
|
</Aggregation>
|
|
</Plugin>
|
|
|
|
<Plugin interface>
|
|
Interface "eth0"
|
|
IgnoreSelected false
|
|
</Plugin>
|
|
|
|
<Plugin swap>
|
|
ReportByDevice false
|
|
ReportBytes true
|
|
</Plugin>
|
|
|
|
<Plugin python>
|
|
# https://blog.dbrgn.ch/2017/3/10/write-a-collectd-python-plugin/
|
|
ModulePath "/home/yellowtent/box/setup/start/collectd/"
|
|
LogTraces false # enable this to get traces in /var/log/collectd.log
|
|
Interactive false
|
|
|
|
Import "df"
|
|
|
|
Import "du"
|
|
<Module du>
|
|
<Path>
|
|
Instance maildata
|
|
Dir "/home/yellowtent/boxdata/mail"
|
|
</Path>
|
|
<Path>
|
|
Instance boxdata
|
|
Dir "/home/yellowtent/boxdata"
|
|
Exclude "mail"
|
|
</Path>
|
|
<Path>
|
|
Instance platformdata
|
|
Dir "/home/yellowtent/platformdata"
|
|
</Path>
|
|
</Module>
|
|
</Plugin>
|
|
|
|
<Plugin write_graphite>
|
|
<Node "graphing">
|
|
Host "localhost"
|
|
Port "2003"
|
|
Protocol "tcp"
|
|
LogSendErrors true
|
|
Prefix "collectd."
|
|
StoreRates true
|
|
AlwaysAppendDS false
|
|
EscapeCharacter "_"
|
|
</Node>
|
|
</Plugin>
|
|
|
|
<Include "/etc/collectd/collectd.conf.d">
|
|
Filter "*.conf"
|
|
</Include>
|