[collectd] Notification issues
toniylenius at gmail.com
Sun Jul 17 10:56:01 CEST 2011
On Sunday 17 July 2011 11:21:24 sebastiano at datafaber.net wrote:
> 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 at 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"
> LoadPlugin exec
> <Plugin exec>
> NotificationExec root "/etc/collectd/collectd-notify.sh"
> <Plugin "df">
> <Type "df">
> WarningMin 90
> FailureMin 85
> Persist true
> Percentage true
> 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 at echo scripts]# cat /etc/collectd/collectd-notify.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 at verplant.org
first of all, in collectd version 5.0.0 you need to load the threshold plugin.
You didn't state that you had it in your configuration.
I made this mistake when migrated to 5.0.0.
More information about the collectd