config/puppet-manifests/src/modules/platform/templates/collectd.conf.erb
Eric MacDonald 44e2f196d6 Collectd+InfluxDb-RMON Replacement(ALL METRICS) P1
This update introduces two new open source services to the Titanium
Cloud.

The first is 'collectd' which is a plugin based resource monitoring
engine intended to obsolete the existing rmond process.
The second service is 'influxdb' which is a light weight time series
database intended to store sample data.

Collectd and influxdb are configured through puppet and are started by
manifest.

Collectd runs on all hosts while influxdb only runs on the controllers,.
Colectd periodically monitors platform cpu, memory and filesystem
resources in terms of percentage used value. The value sample for each
monitored resource for each audit cycle is forwarded to the active
controller for storage in the 'influxdb' database.

This update develops several collectd 'support' plugins for managing
thresholds, alarms, and host degrade. Additionally, this update
implements home-grown plugins for platform cpu and memory monitoring
and combines the static and dynamic filesystem resource monitoring in
rmond into a single filesystem plugin based on collectd's stock 'df'
plugin.

Collectd's network plugin is configured to forward samples to the active
controller while influxdb that only runs on the controllers are
configured to listen for collectd samples and then store them in its
database.

Change-Id: I797f01ca09df3a7e8236153e4f0cb1f90be4c9b5
2018-06-29 13:44:43 -04:00

117 lines
4.1 KiB
Plaintext

#
# Config file for collectd(1).
# Please read collectd.conf(5) for a list of options.
# http://collectd.org/
#
##############################################################################
# Global #
#----------------------------------------------------------------------------#
# Global settings for the daemon. #
##############################################################################
FQDNLookup true
BaseDir "/var/lib/collectd"
PIDFile "/var/run/collectd.pid"
PluginDir "/usr/lib64/collectd"
TypesDB "/usr/share/collectd/types.db"
#----------------------------------------------------------------------------#
# When enabled, plugins are loaded automatically with the default options #
# when an appropriate <Plugin ...> block is encountered. #
# Disabled by default. #
#----------------------------------------------------------------------------#
AutoLoadPlugin true
#----------------------------------------------------------------------------#
# When enabled, internal statistics are collected, using "collectd" as the #
# plugin name. #
# Disabled by default. #
#----------------------------------------------------------------------------#
CollectInternalStats true
#----------------------------------------------------------------------------#
# 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> #
#----------------------------------------------------------------------------#
Interval <%= @interval %>
MaxReadInterval <%= @max_read_interval %>
Timeout <%= @timeout %>
ReadThreads <%= @read_threads %>
WriteThreads <%= @write_threads %>
# 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.
<%- if @write_queue_limit_high -%>
WriteQueueLimitHigh <%= @write_queue_limit_high %>
<%- end -%>
<%- if @write_queue_limit_low -%>
WriteQueueLimitLow <%= @write_queue_limit_low %>
<%- end -%>
##############################################################################
# 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
#LoadPlugin logfile
#LoadPlugin log_logstash
#<Plugin logfile>
# LogLevel info
# File "/var/log/collectd.log"
# Timestamp true
# PrintSeverity true
#</Plugin>
#<Plugin log_logstash>
# LogLevel info
# File "/var/log/collectd.json.log"
#</Plugin>
#<Plugin syslog>
# LogLevel info
#</Plugin>
# Have collectd send to these servers on server_port
<Plugin network>
<%- @server_addrs.each do |server_addr| -%>
Server "<%= server_addr %>" "<%= @server_port %>"
<%- end -%>
</Plugin>
LoadPlugin python
<Plugin python>
<%- if @module_path != "" -%>
ModulePath "<%= @module_path %>"
<%- end -%>
<%- @plugins.each do |plugin| -%>
Import "<%= plugin %>"
<%- if plugin == 'mtce_notifier' -%>
<Module "mtce_notifier">
Port <%= @mtce_notifier_port %>
</Module>
<%- end -%>
<%- end -%>
<%- if @log_traces -%>
LogTraces <%= @log_traces %>
<%- end -%>
<%- if @encoding -%>
Encoding "<%= @encoding %>"
<%- end -%>
Interactive false
</Plugin>
# The default plugin directory
<%- if @collectd_d_dir -%>
Include "<%= @collectd_d_dir %>"
<%- end -%>