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