[collectd] Having problems with notifications

Andrés J. Díaz ajdiaz at connectical.com
Fri May 22 11:20:11 CEST 2009


Hi János (et al)

I'm using collectd 4.7.0 with the proposed patch for plugin.c and exec
notification works for me. This is my piece of configuration file (a
dummy threshold for test):

<Threshold>
  <Plugin load>
    <Type load>
      WarningMax 0.1
    </Type>
  </Plugin>
</Threshold>

And the exec plugin section:

LoadPlugin exec
<Plugin exec>
#	Exec "user:group" "/path/to/exec"
	NotificationExec "ajdiaz" "/home/ajdiaz/test"
</Plugin>

The test file is a bash script owned by the user used in
NotificationExec with 755 perms, which only do a "cat >> /tmp/test"

Maybe you need to assign permissions to your .pl?, be carefull with
the owner of the file and the exec permissions on the directory. Try
to run manually the script: su -c /path/to/script nobody.

I hope to help you a bit :)

Regards,
  Andrés

2009/5/19 János Prepuk <prepuk.janos at gmail.com>:
> Hi Florian,
>
> I patched the plugin.c and then I can see the notifications in the logfile.
> But the notificationexec file isn' t run when come a notification.
>
> LoadPlugin exec
> <Plugin exec>
>
>   NotificationExec "nobody" "/usr/local/bin/handle_notification.pl"
> </Plugin>
>
> Have you got any idea?
>
> Thank you in advance.
>
> Regards,
> Janos Prepuk
>
>
> 2009/5/18 Florian Forster <octo at verplant.org>
>>
>> Hi Andrés,
>>
>> On Mon, May 04, 2009 at 01:10:06PM +0200, Andrés J. Díaz wrote:
>> > --- /tmp/collectd-4.6.2/src/plugin.c  2009-03-18 11:55:39.000000000
>> > +0100
>> > +++ src/plugin.c      2009-05-04 12:41:06.000000000 +0200
>> > @@ -959,6 +959,7 @@
>> >
>> >       /* Update the value cache */
>> >       uc_update (ds, vl);
>> > +     ut_check_threshold (ds, vl);
>> >
>> >       if (post_cache_chain != NULL)
>> >       {
>>
>> oh, this is indeed a bug.. Thanks for the patch, I'll apply it and pack
>> a new release shortly.
>>
>> Regards,
>> -octo
>> --
>> Florian octo Forster
>> Hacker in training
>> GnuPG: 0x91523C3D
>> http://verplant.org/
>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.6 (GNU/Linux)
>>
>> iD8DBQFKEU+XHdggu3Q05IYRAmumAJ0SUDzkgTkDci7Qzchv8TtMQFk65ACeIiI9
>> 7NkD80YNXEBARVqhv3g16bU=
>> =mf+N
>> -----END PGP SIGNATURE-----
>>
>> _______________________________________________
>> collectd mailing list
>> collectd at verplant.org
>> http://mailman.verplant.org/listinfo/collectd
>>
>
>



More information about the collectd mailing list