-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME
90 lines (65 loc) · 3.17 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
HBEATD(7) HBEATD(7)
NAME
hbeatd -- a simple and lightweight heartbeat sensor and pulse program
SYNOPSIS
hbeatd [ options... ]
hbeatd [ -pv ] [ -d ip ] [ -P port ] [ -i interval ] [ -g group ]
hbeatd [ -sv ] [ -P port ] [ -t tolerance ]
DESCRIPTION
hbeatd is a simple and lightweight program for sending and receiving
heartbeats that can be used to check the status of nodes in a cluster
of servers. The pulse program on the nodes sends udp packages to chosen
sensor. The sensor collects the ip's along with the server group and
builds a list. Everytime a new heartbeat is received it will update the
timestamp for the node and check the list for dead nodes (nodes with a
timestamp older than the tolerance level). If a node is dead, a script
located at /etc/hbeatd/rc.d will run.
OPTIONS
Unless specifically stated otherwise, options are applicable in all
operating modes.
-p Run hbeatd in pulse mode.
-s Run hbeatd in sensor mode.
-v Run in verbose mode, not as daemon.
-d ip Destination ip address (only available in pulse mode). The
default is 127.0.0.1.
-P port Destination port number (only available in pulse mode). The
default is 6220.
-i interval
The interval in milliseconds between pulses (only available in
pulse mode). The default is 1000 (1 second).
-g group
A group name ex. 'web' or 'db', good when building lists of
available nodes for deployment and maintenance etc. (only avail-
able in pulse mode). The default is 'misc'.
-t tolerance
The number of seconds before reporting that the node is dead
(only available in sensor mode). The default is 4.
EXAMPLES
hbeat -d 192.168.0.50
Start hbeatd in pulse mode.
hbeatd -p -i 800 -v
Start hbeatd in pulse mode without daemonizing it. Sending
heartbeats with 800 milliseconds interval.
hbeatd -s
Start hbeatd in sensor mode.
hbeatd -s -t 20
Start hbeatd in sensor mode with a tolereance of 20 seconds.
hbeatd -s -P 8910 -v
Start hbeatd in sensor mode on port 8910 without daemonizing it
(good for debugging).
FILES
/etc/hbeatd/rc.d
An executable file that runs everytime hbeatd founds a new, dead
or resurrected node. The script or program can take three argu-
ments; status, ip and group.
Example sh-script:
if [ "$1" = "dead" ]; then
echo "dead: $2($3)" >> /tmp/hbeatd.log
elif [ "$1" = "up" ]; then
echo "up: $2($3)" >> /tmp/hbeatd.log
elif [ "$1" = "new" ]; then
echo "new: $2($3)" >> /tmp/hbeatd.log
fi
AUTHOR
Jack Engqvist Johansson <[email protected]>
Hbeatd Version 1.3.1 14 September 2012 HBEATD(7)