From 33f7f5f5ef65b1fe716f281554023795e1388fe6 Mon Sep 17 00:00:00 2001 From: Vladimir Vitkov Date: Mon, 19 Oct 2015 11:16:24 +0300 Subject: [PATCH] Centrall collectd server config --- monitoring/collectd/server/README.md | 8 ++ monitoring/collectd/server/collectd.conf | 150 +++++++++++++++++++++++ monitoring/collectd/server/openwrt.db | 4 + 3 files changed, 162 insertions(+) create mode 100644 monitoring/collectd/server/README.md create mode 100644 monitoring/collectd/server/collectd.conf create mode 100644 monitoring/collectd/server/openwrt.db diff --git a/monitoring/collectd/server/README.md b/monitoring/collectd/server/README.md new file mode 100644 index 0000000..bcab539 --- /dev/null +++ b/monitoring/collectd/server/README.md @@ -0,0 +1,8 @@ +# collectd server config +Config file for centralized collectd server + +# Prerequisites +``` +apt-get install collectd collectd-core collectd-utils +``` +Minimum version of collectd required is 5.1 (needed for graphite) diff --git a/monitoring/collectd/server/collectd.conf b/monitoring/collectd/server/collectd.conf new file mode 100644 index 0000000..4c0e5b3 --- /dev/null +++ b/monitoring/collectd/server/collectd.conf @@ -0,0 +1,150 @@ +############################################################################## +# Global # +#----------------------------------------------------------------------------# +# Global settings for the daemon. # +############################################################################## + +#Hostname "localhost" +FQDNLookup false +#BaseDir "/var/lib/collectd" +#PluginDir "/usr/lib/collectd" +TypesDB "/usr/share/collectd/types.db" "/etc/collectd/openwrt.db" + +#----------------------------------------------------------------------------# +# Interval at which to query values. This may be overwritten on a per-plugin # +# base by using the 'Interval' option of the LoadPlugin block: # +# # +# Interval 60 # +# # +#----------------------------------------------------------------------------# +Interval 10 + +#Timeout 2 +#ReadThreads 5 +# avoid race conditions if multiple datapoints are packed in a single packet +WriteThreads 2 + +# Logging +LoadPlugin syslog + + LogLevel info + + +# now start collecting +LoadPlugin cpu + +# free space +LoadPlugin df + + # Ignore listed filesystems + IgnoreSelected true + # and select all virtual crap + FSType bdev + FSType binfmt_misc + FSType cgroup + FSType cpuset + FSType debugfs + FSType devpts + FSType devtmpfs + FSType hugetlbfs + FSType mqueue + FSType pipefs + FSType proc + FSType pstore + FSType ramfs + FSType rootfs + FSType rpc_pipefs + FSType securityfs + FSType sockfs + FSType sysfs + FSType tmpfs + + +# IOPS +LoadPlugin disk + +# LOADAVG +LoadPlugin load + +# Ram utilisation +LoadPlugin memory + +# SWAP +LoadPlugin swap + +# Logged in +LoadPlugin users + +# traffic +LoadPlugin interface + +# temp, voltage, current, fans via ipmi +# all sensors monitored by default +# +# THIS IS SPECIFFIC to the current box +LoadPlugin ipmi + + # disable some sensors collection + IgnoreSelected true + Sensor "VRM 2 processor_module (9.2)" + Sensor "VRM 1 processor_module (9.1)" + Sensor "Power Supply 1 power_supply (10.1)" + Sensor "Power Supply 2 power_supply (10.2)" + Sensor "Power Supplies power_supply (10.3)" + Sensor "UID Light system_chassis (23.1)" + Sensor "Int. Health LED system_chassis (23.2)" + Sensor "Ext. Health LED system_chassis (23.3)" + + +# IRQ +LoadPlugin irq + +# nginx stats +LoadPlugin nginx + + URL "http://localhost/of2015status" + + +# now lets listen/send some data here and there +# def port 25826 +LoadPlugin network + + # multicast + Listen "239.192.74.66" + Listen "ff18::efc0:4a42" + # All local interfaces + #Listen "0.0.0.0" + # FIXME: We will listen only on mgmt + Listen "*" + ReportStats true + + +# entropy statistics +LoadPlugin entropy + +# Connection tracking table +LoadPlugin ConnTrack + +# context switches (how hard we are working) +LoadPlugin ContextSwitch + +# and finaly save the data in graphite +LoadPlugin write_graphite + + + Host "localhost" + Port "10001" + Protocol "tcp" + + # put it in an unique namespace + Prefix "received." + + LogSendErrors true + + # store raw numbers and let frontend deal with them + StoreRates false + + # be verbose with metrics store + AlwaysAppendDS true + + diff --git a/monitoring/collectd/server/openwrt.db b/monitoring/collectd/server/openwrt.db new file mode 100644 index 0000000..be918b6 --- /dev/null +++ b/monitoring/collectd/server/openwrt.db @@ -0,0 +1,4 @@ +stations value:GAUGE:0:256 +signal_noise_mw value:GAUGE:0:U +signal_power_mw value:GAUGE:0:U +