dont print a lot of log information about shutting down vsftpd
[metze/ctdb/wip.git] / config / notify.sh
1 #!/bin/sh
2
3 # This script is activated by setting CTDB_NOTIFY_SCRIPT=/etc/ctdb/notify.sh
4 # in /etc/sysconfig/ctdb
5
6 # This is script is invoked from ctdb when node UNHEALTHY flag changes.
7 # and can be used to send SNMPtraps, email, etc
8 # when the status of a node changes
9
10
11 event="$1"
12 shift
13
14 case $event in
15         unhealthy)
16 #
17 #               Send an snmptrap that the node is unhealthy :
18 #               snmptrap -m ALL -v 1 -c public 10.1.1.105 ctdb `hostname` 0 0 `date +"%s"` ctdb.nodeHealth.0 i 1
19 #
20 #               or send an email :
21 #               mail foo@bar -s "`hostname` is UNHEALTHY"   ...
22 #
23 #               or do something else ...
24                 ;;
25         healthy)
26 #
27 #               Send an snmptrap that the node is healthy again :
28 #               snmptrap -m ALL -v 1 -c public 10.1.1.105 ctdb `hostname` 0 0 `date +"%s"` ctdb.nodeHealth.0 i 0
29 #
30 #               or send an email :
31 #               mail foo@bar -s "`hostname` is HEALTHY"   ...
32 #
33 #               or do something else ...
34                 ;;
35         startup)
36         #               do some extra magic when ctdb has finished the initial
37         #               recovery?
38                 ;;
39
40         setup)
41         #               do some extra magic when ctdb has setup itself?
42                 ;;
43
44         init)
45         #               do some extra magic when ctdb has started?
46                 ;;
47 esac
48
49 exit 0