[collectd] enhancment for threshold (make a notice when value is in range)

Dieter Bloms collectd at bloms.de
Fri Mar 14 11:59:37 CET 2008


Hi,

On Fri, Mar 14, Sebastian Harl wrote:

> Currently, collectd sends an "OKAY-notification" whenever a value turns
> back to state "OKAY" - this is not configurable though. So that should
> already work for you.

It doesn't work for me.
I use collectd-4.3.1 with a patch from Florian (threshols-fix-4.3.1.diff
from 05.03.2008 on this list).

My config looks like this:

--snip--
Mode        "local"
Hostname    "myserver"
BaseDir     "/var/lib/collectd"
PIDFile     "/tmp/collectd.pid"
PluginDir   "/usr/lib/collectd"
TypesDB     "/usr/lib/collectd/types.db"
LoadPlugin logfile
LoadPlugin cpu
LoadPlugin df
LoadPlugin disk
LoadPlugin exec
LoadPlugin interface
LoadPlugin iptables
LoadPlugin load
LoadPlugin memory
LoadPlugin network
LoadPlugin ntpd
LoadPlugin processes
LoadPlugin rrdtool
LoadPlugin swap
LoadPlugin syslog
<Plugin logfile>
  LogLevel debug
  File stdout
</Plugin>
<Threshold>
  <Plugin "load">
    <Type "load">
      WarningMax    0.50
      FailureMax    1.30
      Persist false
    </Type>
  </Plugin>
</Threshold>
<Plugin exec>
  NotificationExec nobody "/usr/local/bin/collectd_notification.pl"
</Plugin>
--snip--

the script /usr/local/bin/collectd_notification.pl appends every line on
stdin to the attached file.

I made some load to 18.2 and then reduced it to 0.01.
During this time the lines in the attached file output was generated.


-- 
Gruß

  Dieter

--
I do not get viruses because I do not use MS software.
If you use Outlook then please do not put my email address in your
address-book so that WHEN you get a virus it won't use my address in the
From field.
-------------- next part --------------
Severity: WARNING
Time: 1205491515
Host: myserver
Plugin: load
Type: load

Host myserver, plugin load type load: Data source "shortterm" is currently 0.640000. That is above the warning threshold of 0.500000.
Severity: WARNING
Time: 1205491525
Host: myserver
Plugin: load
Type: load

Host myserver, plugin load type load: Data source "shortterm" is currently 1.000000. That is above the warning threshold of 0.500000.
Severity: FAILURE
Time: 1205491535
Host: myserver
Plugin: load
Type: load

Host myserver, plugin load type load: Data source "shortterm" is currently 1.310000. That is above the failure threshold of 1.300000.
Severity: FAILURE
Time: 1205491545
Host: myserver
Plugin: load
Type: load

Host myserver, plugin load type load: Data source "shortterm" is currently 1.570000. That is above the failure threshold of 1.300000.
Severity: FAILURE
Time: 1205491555
Host: myserver
Plugin: load
Type: load

Host myserver, plugin load type load: Data source "shortterm" is currently 1.790000. That is above the failure threshold of 1.300000.
Severity: FAILURE
Time: 1205491565
Host: myserver
Plugin: load
Type: load

Host myserver, plugin load type load: Data source "shortterm" is currently 1.510000. That is above the failure threshold of 1.300000.
Severity: WARNING
Time: 1205491575
Host: myserver
Plugin: load
Type: load

Host myserver, plugin load type load: Data source "shortterm" is currently 1.280000. That is above the warning threshold of 0.500000.
Severity: WARNING
Time: 1205491585
Host: myserver
Plugin: load
Type: load

Host myserver, plugin load type load: Data source "shortterm" is currently 1.080000. That is above the warning threshold of 0.500000.
Severity: WARNING
Time: 1205491595
Host: myserver
Plugin: load
Type: load

Host myserver, plugin load type load: Data source "shortterm" is currently 0.920000. That is above the warning threshold of 0.500000.
Severity: WARNING
Time: 1205491605
Host: myserver
Plugin: load
Type: load

Host myserver, plugin load type load: Data source "shortterm" is currently 0.770000. That is above the warning threshold of 0.500000.
Severity: WARNING
Time: 1205491615
Host: myserver
Plugin: load
Type: load

Host myserver, plugin load type load: Data source "shortterm" is currently 0.730000. That is above the warning threshold of 0.500000.
Severity: WARNING
Time: 1205491625
Host: myserver
Plugin: load
Type: load

Host myserver, plugin load type load: Data source "shortterm" is currently 0.620000. That is above the warning threshold of 0.500000.
Severity: WARNING
Time: 1205491635
Host: myserver
Plugin: load
Type: load

Host myserver, plugin load type load: Data source "shortterm" is currently 0.600000. That is above the warning threshold of 0.500000.
Severity: WARNING
Time: 1205491645
Host: myserver
Plugin: load
Type: load

Host myserver, plugin load type load: Data source "shortterm" is currently 0.510000. That is above the warning threshold of 0.500000.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20080314/4d63a6c9/attachment.pgp 


More information about the collectd mailing list