1 This directory should contain executable programs to handle CTDB event
2 notifications. The first and only argument passed to each program is
3 the event, which is one of:
5 init, setup, startup, unhealthy, healthy
7 An example script that sends SNMP traps for unhealthy/healthy might
14 # Send an SNMP trap saying that the node is unhealthy:
15 snmptrap -m ALL -v 1 -c public 10.1.1.105 ctdb \
16 $(hostname) 0 0 $(date +"%s") ctdb.nodeHealth.0 i 1
19 # Send an SNMP trap saying that the node is healthy again:
20 snmptrap -m ALL -v 1 -c public 10.1.1.105 ctdb \
21 $(hostname) 0 0 $(date +"%s") ctdb.nodeHealth.0 i 0
25 Alternatively, email could be sent:
31 mail -s "$(hostname) is UNHEALTHY" foo@example.com </dev/null >/dev/null 2>&1
34 mail -s "$(hostname) is HEALTHY" foo@example.com </dev/null >/dev/null 2>&1
38 When adding programs please note the exclusion patterns in notify.sh.