> LoadPlugin df
> <Plugin "df">
>   MountPoint "/"
>   MountPoint "/boot"
> </Plugin>
> LoadPlugin exec
> <Plugin exec>
>   NotificationExec root "/etc/collectd/collectd-notify.sh"
> </Plugin>
> LoadPlugin threshold
> <Threshold>
> ...
> </Threshold>

Well, you can't run Exec's as root IIRC.  Here is what I have:

    <Threshold>
      <Type "df">
        DataSource "used"
        WarningMax 80
        FailureMax 90
        Percentage true
      </Type>
    </Threshold>

    LoadPlugin exec
    <Plugin exec>
      NotificationExec "nobody:nogroup" "/etc/collectd/notify-syslog.sh"
    </Plugin>

Where my .sh is

    #!/bin/sh
    while read x y
    do  case "$x$y" in
            '') exec logger -t collectd${severity+" $severity" -p 
user."$severity"};;
            Severity:WARNING) severity=warning;;
            Severity:OKAY)    severity=notice;;
            Severity:FAILURE) severity=err;;
        esac
    done

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

Reply via email to