-
Notifications
You must be signed in to change notification settings - Fork 390
/
vrouter.sandesh
387 lines (350 loc) · 13.3 KB
/
vrouter.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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
/*
* Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
*/
/**
* This UVE provides information associated with a vRouter such as
*
* virtual networks present on this vRouter,
* virtual machines spawned on the server of this vRouter,
* statistics of the traffic flowing through this vRouter
*
*/
include "base/sandesh/cpuinfo.sandesh"
include "base/sandesh/process_info.sandesh"
include "sandesh/library/common/derived_stats_results.sandesh"
include "vnsw/agent/oper/agent.sandesh"
/**
* Sandesh definition for agent's xen server config
*/
struct AgentXenConfig {
1: string xen_ll_port;
2: string xen_ll_ip;
3: i32 xen_ll_prefix_len;
}
/**
* Sandesh definition for agent's vmware server config
*/
struct AgentVmwareConfig {
1: string vmware_port;
}
/**
* Sandesh definition for agent's vgw config
*/
struct AgentVgwConfig {
1: string interface_name;
2: string vrf_name;
3: list<string> ip_blocks_list;
4: optional list<string> route_list;
}
/**
* Sandesh definition for agent's vhost config
*/
struct AgentVhostConfig {
1: string name;
2: string ip;
3: i32 ip_prefix_len;
4: string gateway;
}
/**
* Sandesh definition for agent's vmware xmpp peer
*/
struct AgentXmppPeer {
1: string ip (aggtype="listkey")
2: bool status;
3: u64 setup_time;
4: bool primary;
}
/**
* Sandesh definition for agent interface
*/
struct AgentInterface {
1: string name (aggtype="listkey")
2: string mac_address;
}
/**
* Sandesh definition for agent
*/
struct VrouterAgent { // Agent info
1: string name (key="ObjectVRouter")
2: optional bool deleted
3: optional list<string> connected_networks;
4: optional list<string> interface_list;
5: optional list<string> virtual_machine_list;
6: optional list<AgentXmppPeer> xmpp_peer_list;
7: optional string collector;
8: optional list<string> self_ip_list;
9: optional string build_info;
10: optional list<string> core_files_list;
11: optional list<string> error_intf_list;
12: optional list<AgentInterface> phy_if;
13: optional AgentInterface vhost_if;
14: optional i32 collector_port;
15: optional string log_file;
16: optional string config_file;
17: optional bool log_local;
18: optional string log_level;
19: optional string log_category;
20: optional i32 sandesh_http_port;
21: optional list<string> dns_servers;
22: optional AgentVhostConfig vhost_cfg;
23: optional string eth_name;
24: optional string tunnel_type;
25: optional string hypervisor;
26: optional AgentXenConfig xen_cfg;
27: optional string ds_addr;
28: optional i32 ds_xs_instances;
29: optional string control_ip;
30: optional list<string> no_config_intf_list;
31: optional u16 total_interface_count;
32: optional u16 down_interface_count;
33: optional AgentVmwareConfig vmware_cfg;
34: optional list<string> dns_server_list_cfg;
35: optional list<string> control_node_list_cfg;
36: optional string hostname_cfg;
37: optional u16 flow_cache_timeout_cfg;
38: optional u32 ll_max_system_flows_cfg;
39: optional u32 ll_max_vm_flows_cfg;
40: optional u32 max_vm_flows_cfg;
41: optional list<AgentVgwConfig> gateway_cfg_list;
42: optional bool headless_mode_cfg;
43: optional list<string> collector_server_list_cfg;
44: optional bool log_flow;
45: optional list<string> tsn_prouter_list;
46: optional list<string> tor_prouter_list;
47: optional list<string> embedded_prouter_list;
48: optional string mode;
49: optional list<string> unmanaged_if_list;
50: optional u32 vn_count; //being sent for UI dashboard optimization
51: optional string platform;
52: optional agent.VrouterObjectLimits vr_limits;
}
/**
* @description: uve for vrouter agent
* @object: Agent
*/
uve sandesh UveVrouterAgent {
1: VrouterAgent data;
}
/**
** Sandesh definition for agent xmpp connection
*/
struct AgentXmppStats {
2: u16 reconnects;
3: u64 in_msgs;
4: u64 out_msgs;
}
/**
* Sandesh definition for vrouter agent vhost interface
*/
struct AgentIfStats {
1: string name (aggtype="listkey")
2: u64 in_pkts;
3: u64 in_bytes;
4: u64 out_pkts;
5: u64 out_bytes;
6: i32 speed;
7: i32 duplexity;
/** Drop packet count */
8: u64 drop_pkts;
/** List of drop reasons with packet count for each drop reason */
9: optional map<string, u64> raw_drop_stats (metric="agg", hidden="yes")
/** @display_name:vhost Interface Packet drop Statistics*/
10: optional map<string, u64> drop_stats (mstats="raw_drop_stats:DSNon0:", tags=".__key")
/** List of drop reasons with packet count for each drop reason for past 1 hour*/
11: optional map<string, u64> drop_stats_1h (mstats="raw_drop_stats:DSSum:3600")
}
struct PhyIfStats {
2: u64 in_pkts;
3: u64 in_bytes;
4: u64 out_pkts;
5: u64 out_bytes;
/** Drop packet count */
6: u64 drop_pkts;
/** List of drop reasons with packet count for each drop reason */
7: optional map<string, u64> raw_drop_stats (metric="agg", hidden="yes")
/** @display_name:Physical Interface Packet drop Statistics*/
8: optional map<string, u64> drop_stats (mstats="raw_drop_stats:DSNon0:", tags=".__key")
/** List of drop reasons with packet count for each drop reason for past 1 hour*/
9: optional map<string, u64> drop_stats_1h (mstats="raw_drop_stats:DSSum:3600")
}
struct PhyIfInfo {
6: i32 speed;
7: i32 duplexity;
}
/**
* Sandesh definition for agent vhost interface bandwidth
*/
struct AgentIfBandwidth {
1: string name (aggtype="listkey")
2: u64 in_bandwidth_usage;
3: u64 out_bandwidth_usage;
}
/**
* Sandesh definition for vrouter flow rate
*/
struct VrouterFlowRate {
1: optional u32 added_flows;
2: optional u32 max_flow_adds_per_second;
3: optional u32 min_flow_adds_per_second;
4: optional u32 deleted_flows;
5: optional u32 max_flow_deletes_per_second;
6: optional u32 min_flow_deletes_per_second;
7: optional u32 active_flows; //'dial' type. So no diff. Always aggregate
}
/**
* Sandesh definition for vrouter
*/
struct VrouterStatsAgent { // Agent stats
1: string name (key="ObjectVRouter")
2: optional bool deleted
//traffic stats
3: optional u64 in_tpkts;
4: optional u64 in_bytes;
5: optional u64 out_tpkts;
6: optional u64 out_bytes;
//Process stats
12: optional cpuinfo.CpuLoadInfo cpu_info;
//Nexthop stats
14: optional u32 nexthops;
//Flow stats
15: optional u64 exception_packets;
16: optional u64 exception_packets_dropped;
17: optional u64 exception_packets_no_route;
18: optional u64 exception_packets_denied;
19: optional u64 exception_packets_allowed;
20: optional u64 total_flows;
22: optional u64 aged_flows;
23: optional u64 aged_flows_dp;
24: optional u64 active_flows_dp;
47: optional u64 flow_export_disable_drops; /* Number of flow samples dropped because of disable of flow exports */
48: optional u64 flow_export_sampling_drops; /* Number of flow samples dropped after subjecting them to sampling algorithm */
49: optional u64 flow_export_drops; /* Number of flows which are never exported */
//Dataplane stats
25: optional u64 in_kernel_ipc_msgs;
26: optional u64 out_kernel_ipc_msgs;
27: optional u64 hash_collisions_dp;
28: optional u64 packets_denied_dp;
29: optional u64 packets_no_route_dp;
30: optional u64 packets_no_mpls_dp;
31: optional u64 packets_no_flow_dp;
32: optional u64 uptime;
33: optional map<string, PhyIfInfo> phy_if_info
/** Statistics for vhost interface */
76: optional AgentIfStats raw_vhost_stats (metric="agg", hidden="yes")
/** @display_name:Vrouter vhost Interface Traffic Statistics*/
77: optional AgentIfStats vhost_stats (stats="raw_vhost_stats:DSNon0:", tags="")
/** Bandwidth of physical interface in bps for last 5 minutes */
36: optional list<AgentIfBandwidth> phy_if_5min_usage;
38: optional list<u32> udp_sport_bitmap;
39: optional list<u32> udp_dport_bitmap;
40: optional list<u32> tcp_sport_bitmap;
41: optional list<u32> tcp_dport_bitmap;
/** List of drop reasons with packet count for each drop reason */
42: optional map<string, u64> raw_drop_stats (metric="agg", hidden="yes")
/** @display_name:Vrouter Packet drop Statistics*/
60: optional map<string, u64> drop_stats (mstats="raw_drop_stats:DSNon0:", tags=".__key")
/** List of drop reasons with packet count for each drop reason for past 1 hour*/
61: optional map<string, u64> drop_stats_1h (mstats="raw_drop_stats:DSSum:3600")
43: optional double total_in_bandwidth_utilization;
44: optional double total_out_bandwidth_utilization;
/** @display_name:Vrouter Flow Setup Statistics*/
45: optional VrouterFlowRate flow_rate (tags="")
65: optional derived_stats_results.AnomalyResult added_flows_ewm
(stats="flow_rate.added_flows:DSAnomaly:EWM:0.1")
66: optional derived_stats_results.AnomalyResult deleted_flows_ewm
(stats="flow_rate.deleted_flows:DSAnomaly:EWM:0.1")
67: optional derived_stats_results.AnomalyResult active_flows_ewm
(stats="flow_rate.active_flows:DSAnomaly:EWM:0.1")
/** @display_name:Physical Interface ingress bandwidth in bps*/
50: optional map<string,u64> phy_band_in_bps (tags="name:.__key")
/** @display_name:Physical Interface egress bandwidth in bps*/
51: optional map<string,u64> phy_band_out_bps (tags="name:.__key")
/** Anomaly Detection for ingress bandwidth of physical interface using
* Exponentially Weighed Mean
*/
52: optional map<string,derived_stats_results.EWMResult> in_bps_ewm
(mstats="phy_band_in_bps:DSEWM:0.1")
53: optional map<string,derived_stats_results.EWMResult> out_bps_ewm
(mstats="phy_band_out_bps:DSEWM:0.1")
/** @display_name:Physical Interface Flow Setup Statistics*/
68: optional map<string, VrouterFlowRate> phy_flow_rate (tags="name:.__key")
69: optional map<string, derived_stats_results.AnomalyResult> phy_added_flows_ewm
(mstats="phy_flow_rate.added_flows:DSAnomaly:EWM:0.1")
70: optional map<string, derived_stats_results.AnomalyResult> phy_deleted_flows_ewm
(mstats="phy_flow_rate.deleted_flows:DSAnomaly:EWM:0.1")
71: optional map<string, derived_stats_results.AnomalyResult> phy_active_flows_ewm
(mstats="phy_flow_rate.active_flows:DSAnomaly:EWM:0.1")
72: optional map<string, PhyIfStats> raw_phy_if_stats (metric="agg", hidden="yes")
/** @display_name:Vrouter Physical Interface Traffic Statistics*/
73: optional map<string, PhyIfStats> phy_if_stats (mstats="raw_phy_if_stats:DSNon0:", tags="name:.__key")
74: optional map<string, derived_stats_results.AnomalyResult> in_pkts_ewm
(mstats="raw_phy_if_stats.in_pkts:DSAnomaly:EWM:0.1")
75: optional map<string, derived_stats_results.AnomalyResult> out_pkts_ewm
(mstats="raw_phy_if_stats.out_pkts:DSAnomaly:EWM:0.1")
}
/**
* Vrouter statistics uve
*/
uve sandesh VrouterStats {
1: VrouterStatsAgent data;
}
/**
* Sandesh definition for vrouter cpu usage
*/
struct VrouterCpuInfo {
1: u32 mem_virt
2: double cpu_share
3: u32 used_sys_mem
4: double one_min_cpuload
5: u32 mem_res
}
/**
* Sandesh definition for compute node cpu stats
*/
struct ComputeCpuState {
1: string name (key="ObjectVRouter")
2: optional bool deleted
/** @display_name:Compute CPU Information*/
3: optional list<VrouterCpuInfo> cpu_info (tags=".mem_virt,.cpu_share,.mem_res", aggtype="union")
}
/**
* @description: uve for compute node cpu stats
* @severity: DEBUG
*/
uve sandesh ComputeCpuStateTrace {
1: ComputeCpuState data
}
/**
* Sandesh definition for VRF routing table size on vrouter
*/
struct RouteTableSize {
1: u32 inet4_unicast;
2: u32 inet4_multicast;
3: u32 evpn;
4: u32 bridge;
5: u32 inet6_unicast;
}
/**
* Sandesh definition for vrouter control information
*/
struct VrouterControlStats {
1: string name (key="ObjectVRouter")
2: optional bool deleted
/** @display_name:Vrouter XMPP Statistics*/
3: optional map<string, AgentXmppStats> raw_xmpp_stats (metric="agg", hidden="yes")
4: optional map<string, AgentXmppStats> xmpp_stats (mstats="raw_xmpp_stats:DSChange:")
/** @display_name:Vrouter IFMAP Parse Error Statistics*/
5: optional map<string, u64> raw_ifmap_stats (metric="agg", hidden="yes")
6: optional map<string, u64> ifmap_stats
(mstats="raw_ifmap_stats:DSNon0:")
7: optional map<string, u64> ifmap_stats_1h
(mstats="raw_ifmap_stats:DSSum:3600")
8: optional map<string, RouteTableSize> raw_rt_table_size (metric="agg", hidden="yes")
9: optional map<string, RouteTableSize> rt_table_size (mstats="raw_rt_table_size:DSChange:")
}
/**
* Vrouter control statistics uve
*/
uve sandesh VrouterControlStatsTrace {
1: VrouterControlStats data;
}