-
Notifications
You must be signed in to change notification settings - Fork 390
/
analytics.sandesh
142 lines (129 loc) · 4.51 KB
/
analytics.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/*
* Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
*/
/**
* Definitions of structures used to send memory and cpu information of the
* Analytics Node processes.
*/
include "base/sandesh/cpuinfo.sandesh"
include "base/sandesh/process_info.sandesh"
/**
* This structure carries process's memory and cpu information on
* a per module per instance basis
*/
struct ModuleCpuInfo {
1: string module_id
2: string instance_id
4: cpuinfo.CpuLoadInfo cpu_info
}
/**
* This structure carries memory and cpu information for a list
* of processes
*/
struct ModuleCpuState {
1: string name (key="ObjectCollectorInfo")
2: optional bool deleted
4: optional list<ModuleCpuInfo> module_cpu_info (aggtype="union")
}
/**
* @description: UVE to carry process's memory and cpu information,
* @object: analytics-node
*/
uve sandesh ModuleCpuStateTrace {
1: ModuleCpuState data
}
/**
* This structure carries process's memory and cpu information,
* these are used as stats fields in the Analytics Node UVE. As with any other
* stats, these can be used for any slice/dice queries
*/
struct AnalyticsCpuState {
1: string name (key="ObjectCollectorInfo")
2: optional bool deleted
3: optional list<cpuinfo.ProcessCpuInfo> cpu_info (tags=".module_id,.mem_virt,.cpu_share,.mem_res", aggtype="union")
}
/**
* @description: UVE to carry statistics data for a process's memory and cpu
* info
* @object: analytics-node
*/
uve sandesh AnalyticsCpuStateTrace {
1: AnalyticsCpuState data
}
/**
* This structure used to send NodeStatus data for Analytics Node
* - process_status carries process's status [functional/non-functional]
* - process_info carries process's state [up/down]
* Each of the processes on Analytics Node will send this information and aggregation
* will happen on UVE queries.
*/
struct NodeStatus {
1: string name (key="ObjectCollectorInfo")
2: optional bool deleted
3: optional string status
// Sent by process
4: optional list<process_info.ProcessStatus> process_status (aggtype="union")
// Sent by node manager
5: optional list<process_info.ProcessInfo> process_info (aggtype="union")
6: optional list<process_info.DiskPartitionUsageStats> disk_usage_info (tags="")
7: optional string description
8: optional list<string> all_core_file_list
10: optional list<cpuinfo.ProcessCpuInfo> process_mem_cpu_usage (aggtype="union")
11: optional cpuinfo.SystemMemCpuUsage system_mem_cpu_usage
12: optional cpuinfo.SystemCpuInfo system_cpu_info
}
/**
* @description: UVE to send NodeStatus data for Analytics Node
* @object: analytics-node
*/
uve sandesh NodeStatusUVE {
1: NodeStatus data
}
/**
* structure to carry contrail-query-engine query statistics
*/
struct QueryStats {
2: string qid
20: string where
21: string select
22: string post
23: u32 time_span
24: string error
3: u32 chunks
4: string chunk_where_time;
5: string chunk_select_time;
6: string chunk_postproc_time;
7: string chunk_merge_time;
8: u32 final_merge_time;
9: u32 time
10: u32 rows
11: u32 enq_delay
}
/**
* @description: objectlog structure to send query statistics
* @object: analytics-node
*/
objectlog sandesh QueryPerfInfo {
1: string name (key="ObjectCollectorInfo")
3: string table
10: QueryStats query_stats (tags="table,name:.qid,.rows,.time")
}
/**
* structure to carry contrail-analytics-api query statistics
*/
struct AnalyticsApiSample {
1: string operation_type // (GET, POST)
3: string remote_ip
5: string object_type
6: string request_url
8: u64 response_time_in_usec
9: u64 response_size
10: string node (key="ObjectCollectorInfo")
}
/**
* @description: objectlog structure to send contrail-analytics-api query statistics
* @object: analytics-node
*/
objectlog sandesh AnalyticsApiStats {
1: AnalyticsApiSample api_stats (tags=".operation_type,.remote_ip,.object_type")
}