Alert Module

Botman

Compatibility:

Description

This module will run commands at given intervals, and store their output into custom variables.
If the alert module detects a change since last command run, it will then send a notification to Alfred so you can get warned about it.
Example use cases:

Configuration

Configuration is done inside /usr/local/etc/gotham/modules.conf.d/alert.conf:

[
   {
      "name" : "zpool_status",
      "interval" : 300,
      "command" : "/usr/local/share/gotham/modules.d/alert/zpool_status.sh",
      "group" : "Support"
   }
]
In this example, we only run one script: zpool_status.sh.

#!/usr/local/bin/bash

zpool status | grep "state:" | awk '{print $2}'
exit 0
This script will output ONLINE if your zpool is healthy, otherwise it would change value to (DEGRADED|FAULTED|OFFLINE|UNAVAIL|REMOVED).

Every change in the output of commands will be sent to the Support group from the notification module.