b0cceca81bb84aa404e7135ac5652121d66b3546
[integration/test.git] / test / tools / clustering / cluster-monitor / readme.txt
1 Cluster Monitor Tool
2 Author: Phillip Shea
3 Updated: 2015-May-07
4
5 This tool provides real-time visualization of the cluster member roles for all
6 shards in the config datastore. It is useful for understanding cluster behavior
7 in when controllers are isolated, downed, or rebooted. The tool assumes that all
8 cluster members have the same shards.
9
10 A file named 'cluster.json' containg a list of the IP addresses of the
11 controllers is required. This resides in the same directory as monitor.py.
12 "user" and "pass" are not required for monitor.py, but they may be
13 needed for other apps in this folder. Because the contains configuration
14 information unique to your environment, it may be more convenient to
15 copy the contents of this folder out of git to prevent these settings
16 from being overwritten by updates.
17
18
19 The file should look like this:
20
21     {
22         "cluster": {
23             "controllers": [
24                 "172.17.10.93",
25                 "172.17.10.94",
26                 "172.17.10.95"
27             ],
28             "user": "username",
29             "pass": "password"
30         }
31     }
32
33 Usage:python monitor.py
34
35 Starting:
36
37 Before using, start and configure all controllers in the cluster. Use of the
38 cluster deployer script is recommended. All controllers must initially be
39 running so the tool can retrieve the controller and shard names. Once
40 the tool is started and the controller and cluster shard names are retrieved,
41 controllers can be isolated, downed, rebooted, etc.
42
43
44 The UI:
45
46 Controller member names (not host names) are displayed across the top. Shard
47 names are displayed to the left.
48
49 In the upper left is a heart emoticon "<3" which toggles between yellow and
50 black backgrounds with each update. If a controller is down, the http timeout
51 comes in to play and updating becomes much slower.
52
53 The central matrix displays controller roles. When rest queries fail, the
54 error type is displayed. Leader, Follower, and Candidate roles are color-
55 coded.
56
57
58 Other scripts:
59
60 isolate.py
61
62     Isolates an indicated controller from the cluster.
63
64 rejoin.py
65
66     Rejoins any isolated controllers to the cluster.
67
68 timed_isolation.py
69
70     Isolates an indicated controller for a specified duration
71
72
73 Future enhancements:
74
75     Add operational shards.