Collectd plugin for sending notifications to Notify Android app.
Implemented as a bash script
- bash
- curl
- GNU bc or some other POSIX-compatible version of bc.
Install the script in any location
The exec plugin must be loaded in collectd.conf. The exec plugin is configured with a username (to run the script), path to the script and identifier from the Notify app.
LoadPlugin exec
<Plugin exec>
NotificationExec username "/usr/local/bin/collectd-notify.sh" "myKey"
</Plugin>
The threshold plugin must also be loaded and configured in order to generate notifications. More information can be found on collectd-threshold(5) man page.
The following configuration example configures a warning notification to be sent if the load (midterm) gets above 3, and a failure notification is sent if the load gets above 5.
LoadPlugin threshold
<Plugin threshold>
<Type load>
DataSource midterm
WarningMax 3
FailureMax 5
</Type>
</Plugin>