[collectd] configure threshold for load plugin

Dieter Bloms collectd at bloms.de
Wed Mar 5 11:51:39 CET 2008


Hi,

I tried to configure a threshold for the load plugin to execute a little
perlscript, which set an event for me.

My config looks like this:

--snip--
myserver:~ # cat /etc/collectd.conf
Mode        "local"
Hostname    "myserver"
BaseDir     "/var/lib/collectd"
PIDFile     "/tmp/collectd.pid"
PluginDir   "/usr/lib/collectd"
TypesDB     "/usr/lib/collectd/types.db"
LoadPlugin exec
LoadPlugin load
LoadPlugin logfile
<Threshold>
  <Plugin "load">
    <Type "load">
      Instance "1m"
      WarningMax    0.50
      FailureMax    1.00
    </Type>
  </Plugin>
</Threshold>

<Plugin exec>
  NotificationExec nobody "/usr/local/bin/collectd_notification.pl"
</Plugin>
<Plugin logfile>
  LogLevel debug
  File STDOUT
</Plugin>
--snip--

I produced a load from about 2.3 and my perl script is not executed.

I can't see any useful information from debug output:

--snip-
mailproxy16:~ # /var/service/collectd/run
[2008-03-05 11:47:57] return (0)
[2008-03-05 11:47:57] interval_g = 10;
[2008-03-05 11:47:57] hostname_g = myserver
[2008-03-05 11:47:57] [thread #3085241248] plugin: plugin_read_thread: Waiting on read_cond.
[2008-03-05 11:47:57] [thread #3076848544] plugin: plugin_read_thread: Waiting on read_cond.
[2008-03-05 11:47:57] [thread #3068455840] plugin: plugin_read_thread: Waiting on read_cond.
[2008-03-05 11:47:57] [thread #3060063136] plugin: plugin_read_thread: Waiting on read_cond.
[2008-03-05 11:47:57] [thread #3051670432] plugin: plugin_read_thread: Waiting on read_cond.
[2008-03-05 11:47:57] plugin: plugin_read_all: Signalling `read_cond'
[2008-03-05 11:47:57] [thread #3085241248] plugin: plugin_read_thread: Handling exec
[2008-03-05 11:47:57] [thread #3085241248] plugin: plugin_read_thread: Handling load
[2008-03-05 11:47:57] [thread #3085241248] plugin: plugin_read_thread: Waiting on read_cond.
[2008-03-05 11:47:57] [thread #3076848544] plugin: plugin_read_thread: Waiting on read_cond.
[2008-03-05 11:47:57] [thread #3068455840] plugin: plugin_read_thread: Waiting on read_cond.
[2008-03-05 11:47:57] [thread #3060063136] plugin: plugin_read_thread: Waiting on read_cond.
[2008-03-05 11:47:57] [thread #3051670432] plugin: plugin_read_thread: Waiting on read_cond.
[2008-03-05 11:48:08] plugin: plugin_read_all: Signalling `read_cond'
[2008-03-05 11:48:08] [thread #3085241248] plugin: plugin_read_thread: Handling exec
[2008-03-05 11:48:08] [thread #3085241248] plugin: plugin_read_thread: Handling load
[2008-03-05 11:48:08] [thread #3085241248] plugin: plugin_read_thread: Waiting on read_cond.
[2008-03-05 11:48:08] [thread #3076848544] plugin: plugin_read_thread: Waiting on read_cond.
[2008-03-05 11:48:08] [thread #3068455840] plugin: plugin_read_thread: Waiting on read_cond.
[2008-03-05 11:48:08] [thread #3060063136] plugin: plugin_read_thread: Waiting on read_cond.
[2008-03-05 11:48:08] [thread #3051670432] plugin: plugin_read_thread: Waiting on read_cond.
--snip--

syslog says:

--snip--
[2008-03-05 11:47:57] ut_threshold_add: Adding entry `/load/load-1m'
[2008-03-05 11:47:57] exec plugin: argv[0] = collectd_notification.pl
[2008-03-05 11:47:57] type = logfile, key = LogLevel, value = debug
[2008-03-05 11:47:57] return (0)
[2008-03-05 11:47:57] type = logfile, key = File, value = STDOUT
--snip--

does anybody knows what is wrong here ?

I want to execute the perl script when a defined value (in this
testcase a load of 1) is passed.

Thank you.

-- 
Best regards

  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 --------------
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/20080305/59dabd11/attachment-0001.pgp 


More information about the collectd mailing list