sfl-linux-system-collectd
Dependencies
Shinken Modules
This pack will create services which need the following modules :
- Arbiter/Receiver : mod-collectd
Here an example of a arbiter-collectd module config file:
## Module: Collectd
## Loaded by: Arbiter, Receiver
# Receive passive host and service results from a collectd daemon.
define module {
module_name Collectd
module_type collectd
#
# Specify exact host (optional)
host 0.0.0.0
port 25826
# port 25827
# multicast False
grouped_collectd_plugins cpu,df,disk,interface,ntpd
}
# this file is provided by (Minion ID): SHINKENFULL
Plugins
This pack will create services which need the following plugins :
Network
This pack will create services which need the following protocol :
- UDP 25826 from monitored client to the Arbiter/Receiver Collectd module
Collectd
Here an example of a collectd config file:
# COLLECTD: custom configuration file used by STM.
# Global options
Hostname "HOSTNAME"
# When the network plugins (network, write_graphite, etc.) take too
# long to respond, limit the metric list stored in memory.
# e.g. When the remote server times out, do not attempt to store all
# the values in memory.
WriteQueueLimitHigh 50
WriteQueueLimitLow 50
######################################################################
# Common plugins for all the machines.
# Activate the logging plugin before all the others
LoadPlugin syslog
<Plugin syslog>
LogLevel info
NotifyLevel WARNING
</Plugin>
# some plugins will be configured in other files
LoadPlugin cpu
LoadPlugin load
LoadPlugin memory
LoadPlugin users
LoadPlugin disk
LoadPlugin df
LoadPlugin interface
LoadPlugin ntpd
LoadPlugin swap
LoadPlugin processes
# NTP comes from 2 servers
<Plugin ntpd>
Host "10.133.63.17"
Host "10.133.63.19"
Port 123
ReverseLookups false
IncludeUnitID true
</Plugin>
<Plugin df>
IgnoreSelected false
ReportByDevice false
# Also including the reserved space
ReportReserved true
# Free/Used Inodes
ReportInodes true
</Plugin>
<Plugin processes>
Process "shinken-poller.py"
Process "cron"
# Process "rsyslogd"
</Plugin>
# The network plugin send the results to Shinken
LoadPlugin network
<Plugin network>
Server "10.133.63.18" "25826"
</Plugin>
# All the machines will send their data to graphite
LoadPlugin write_graphite
<Plugin write_graphite>
<Node "graphite_server_1">
Host "10.133.63.13"
Port "2003"
Prefix ""
Postfix ".collectd"
Protocol "tcp"
LogSendErrors true
</Node>
<Node "graphite_server_2">
Host "10.133.63.14"
Port "2003"
Prefix ""
Postfix ".collectd"
Protocol "tcp"
LogSendErrors true
</Node>
</Plugin>
######################################################################
# Search for configuration in the directory
Include "/opt/collectd/etc/conf.d"
# this file is provided by (Minion ID): SHINKENPOLLER
Installation
Copy the pack folder in the packs folder defined in shinken.cfg (cfg_dir=packs)
How to use it
Settings
This is the list of settings which can be redefined in the host definition
_LOAD_WARN
type: | 3 comma-separated integer |
description: | Load warning threshold (ie: 7,6,5) |
_LOAD_CRIT
type: | 3 comma-separated integer”, |
description: | Load critical threshold (ie: 10,9,8)” |
_STORAGE_USED_WARN
type: | percent |
description: | Warning level for used storage space |
_STORAGE_USED_CRIT
type: | percent |
description: | Critical level for used storage space |
_PROCESS_CRON_MIN_WARN
type: | integer |
description: | Min number of cron processs, warning threshold |
_PROCESS_CRON_MIN_CRIT
type: | integer |
description: | Min number of cron processs, critical threshold |
_PROCESS_RSYSLOGD_MIN_WARN
type: | integer |
description: | Min number of rsyslog processs, warning threshold |
_PROCESS_RSYSLOGD_MIN_CRIT
type: | integer |
description: | Min number of rsyslog processs, critical threshold |
_PROCESS_OSSEC_MIN_WARN
type: | integer |
description: | Min number of ossec processs, warning threshold |
_PROCESS_OSSEC_MIN_CRIT
type: | integer |
description: | Min number of ossec processs, critical threshold |
Triggers
This is the list of triggers used in the pack :
- collectd_cpu.trig
- collectd_df.trig
- collectd_disk.trig
- collectd_interface.trig
- collectd_load.trig
- collectd_memory.trig
- collectd_processes.trig
- collectd_swap.trig
- collectd_users.trig