[collectd] Setting up notifications

Christian Schneider christian.schneider at desy.de
Fri May 11 14:40:59 CEST 2012


Hello everybody, I'm just setting up collectd, what's working fine.
I just have a problem with notifications. I want to monitor the load
(just for starting with notifications), the "load" plugin is loaded and
collecting data. Then I added the "logfile" plugin, to have a plugin to
receive notifications. This also works, a log file is created where
collectd messages go to.
The only problem is, that I can't figure out, how to setup notifications
properly. This is my config file:
##############################################################################
# Global     #
#----------------------------------------------------------------------------#
# Global settings for the daemon.
     #
##############################################################################

#Hostname    "localhost"
#FQDNLookup   true
#BaseDir     "/var/lib/collectd"
#PIDFile     "/var/run/collectd.pid"
#PluginDir   "/usr/local/lib/collectd"
#TypesDB     "/usr/local/share/collectd/types.db"
#Interval     10
#Timeout      2
#ReadThreads  5

##############################################################################
# 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

<Plugin logfile>
        LogLevel info
        File "/var/log/collectd"
        Timestamp true
        PrintSeverity true
</Plugin>

#<Plugin syslog>
#       LogLevel info
#</Plugin>

##############################################################################
# Plugin section
     #
#----------------------------------------------------------------------------#
# Plugins are loaded and configured here
     #
##############################################################################

##############################################################################
# Output Plugin(s)
     #
##############################################################################
LoadPlugin rrdtool
<Plugin "rrdtool">
        DataDir "/var/lib/collectd/"
        CacheFlush 120
        WritesPerSecond 50
</Plugin>

##############################################################################
# DataCollecting Plugin(s)
     #
##############################################################################

LoadPlugin cpu
<Plugin "cpu">
        #nothing needed for "cpu"
</Plugin>

LoadPlugin interface
<Plugin "interface">
        interface "lo"
        interface "sit0"
        IgnoreSelected true
</Plugin>

LoadPlugin load
<Plugin "load">
        #nothing needed for "load"
</Plugin>

LoadPlugin memory
<Plugin "memory">
        #nothing needed for "memory"
</Plugin>


##############################################################################
# Treshold Configuration for Notifications
     #
##############################################################################

LoadPlugin threshold
<Plugin "threshold">
        <Plugin "load">
                <Type "load">
                        FailureMax 1.0
                </Type>
        </Plugin>
</Plugin>

I'm expecting to get something written in the logfile, if one of the
three loads goes above 1, but nothing happens.
Hope someone can help me here.

Greetings
Christian



More information about the collectd mailing list