/
process_info.sandesh
93 lines (81 loc) · 2.39 KB
/
process_info.sandesh
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
91
92
/*
* Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
*/
namespace cpp process
enum ConnectionType {
TEST,
IFMAP,
XMPP,
COLLECTOR,
DATABASE,
REDIS,
ZOOKEEPER,
DISCOVERY,
APISERVER,
TOR,
}
const map<ConnectionType, string> ConnectionTypeNames = {
ConnectionType.TEST : "Test",
ConnectionType.IFMAP : "IFMap",
ConnectionType.XMPP : "XMPP",
ConnectionType.COLLECTOR : "Collector",
ConnectionType.DATABASE : "Database",
ConnectionType.REDIS : "Redis",
ConnectionType.ZOOKEEPER : "Zookeeper",
ConnectionType.DISCOVERY : "Discovery",
ConnectionType.APISERVER : "ApiServer",
ConnectionType.TOR : "ToR"
}
enum ConnectionStatus {
INIT,
DOWN,
UP,
}
const map<ConnectionStatus, string> ConnectionStatusNames = {
ConnectionStatus.INIT : "Initializing",
ConnectionStatus.DOWN : "Down",
ConnectionStatus.UP : "Up",
}
struct ConnectionInfo {
1: string type
2: string name
3: optional list<string> server_addrs
4: string status
5: optional string description
}
enum ProcessState {
FUNCTIONAL,
NON_FUNCTIONAL,
}
const map<ProcessState, string> ProcessStateNames = {
ProcessState.FUNCTIONAL : "Functional",
ProcessState.NON_FUNCTIONAL : "Non-Functional",
}
// Sent by the process
struct ProcessStatus {
1: string module_id
2: string instance_id
3: string state
4: optional list<ConnectionInfo> connection_infos
5: optional string description
}
// Sent by the node manager
struct DiskPartitionUsageStats {
1: string partition_type
2: string partition_name
3: u64 partition_space_used_1k
4: u64 partition_space_available_1k
}
// Sent by the node manager
struct ProcessInfo {
1: string process_name
2: string process_state
3: u32 start_count
4: u32 stop_count
5: u32 exit_count
// time when the process last entered running stage
6: optional string last_start_time
7: optional string last_stop_time
8: optional string last_exit_time
9: optional list<string> core_file_list
}