I'm using collectd 5.0.0 compiled on a CentOS 5.6 VM (running under KVM if that matters) and I'm having issues in setting up notifications. I'm trying to have this colelctd instance send a notification when the free space on any partition, as given by the "df" plugin, crosses below a threshold: the problem is that no notification is being sent as far as I can see, and I'm unable to determine what I'm doing wrong.

The result of the 'df -h' command is:

[root@echo collectd]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/xvda3             14G  2.8G   11G  21% /
/dev/xvda1            190M   40M  141M  23% /boot
tmpfs                 129M     0  129M   0% /dev/shm


I have the following configuration in collectd.conf:

...
Interval     60
...
LoadPlugin df
<Plugin "df">
  MountPoint "/"
  MountPoint "/boot"
</Plugin>
...
LoadPlugin exec
<Plugin exec>
  NotificationExec root "/etc/collectd/collectd-notify.sh"
</Plugin>
...
<Threshold>
  <Plugin "df">
    <Type "df">
      WarningMin 90
      FailureMin 85
      Persist true
      Percentage true
    </Type>
  </Plugin>
</Threshold>

I've explicitly set the threshold values higher than the currently used percentage to ensure that at least the warning threshold is crossed. The script in NotificationExec is trivial:

[root@echo scripts]# cat /etc/collectd/collectd-notify.sh
#!/bin/sh

echo "blah" >> /var/log/collectd/notification.log

It is executable and it works when called by itself.

Given this configuration, I would expect to have a "blah" string written to the /var/log/collectd/notification.log file each 60 seconds. However, nothing happens and the notification.log isn't even created.

Can anyone help ?


_______________________________________________
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd

Reply via email to