Skip to content

Commit

Permalink
The virtual table schema and sandesh definitions are not in sync, the…
Browse files Browse the repository at this point in the history
…y are

being made to be in sync with this commit. This includes VMI table, the issue
being reported by the PR.

Change-Id: I5d72af8752fcca36e167053514c5a8134b076e65
Closes-Bug: #1552921
(cherry picked from commit 27b717f)
  • Loading branch information
Raj Reddy committed Mar 22, 2016
1 parent b27a358 commit e053754
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/analytics/contrail-snmp-collector/prouter.sandesh
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ struct PRouterEntry {
4: optional list<ArpTable> arpTable
5: optional list<IfTable> ifTable
6: optional list<IfXTable> ifXTable
7: optional list<IfStats> ifStats (tags="name:.ifIndex")
7: optional list<IfStats> ifStats (tags="name:.ifIndex,name:.ifName")
8: optional list<IpMib> ipMib
9: optional list<dot1qTpFdbPortTable> fdbPortTable
10: optional list<dot1dBasePortIfIndexTable> fdbPortIfIndexTable
Expand Down
17 changes: 8 additions & 9 deletions src/analytics/viz.sandesh
Original file line number Diff line number Diff line change
Expand Up @@ -1274,6 +1274,8 @@ const list<stat_table> _STAT_TABLES = [
{ 'name' : 'cpu_stats.rss', 'datatype' : 'int', 'index' : false},
{ 'name' : 'cpu_stats.virt_memory', 'datatype' : 'double', 'index' : false},
{ 'name' : 'cpu_stats.peak_virt_memory', 'datatype' : 'int', 'index' : false},
{ 'name' : 'cpu_stats.disk_allocated_bytes', 'datatype' : 'int', 'index' : false},
{ 'name' : 'cpu_stats.disk_used_bytes', 'datatype' : 'int', 'index' : false},
]
},
{
Expand Down Expand Up @@ -1956,7 +1958,6 @@ const list<stat_table> _STAT_TABLES = [
'obj_table' : VMI_TABLE,
'attributes': [
{ 'name' : 'virtual_network', 'datatype' : 'string', 'index' : true },
{ 'name' : 'fip_diff_stats.other_vn', 'datatype' : 'string', 'index' : true },
{ 'name' : 'fip_diff_stats.ip_address', 'datatype' : 'string', 'index' : true },
{ 'name' : 'fip_diff_stats.in_pkts', 'datatype' : 'int', 'index' : false },
{ 'name' : 'fip_diff_stats.in_bytes', 'datatype' : 'int', 'index' : false },
Expand Down Expand Up @@ -1986,8 +1987,6 @@ const list<stat_table> _STAT_TABLES = [
{ 'name' : 'if_stats.in_bytes', 'datatype' : 'int', 'index' : false },
{ 'name' : 'if_stats.out_pkts', 'datatype' : 'int', 'index' : false },
{ 'name' : 'if_stats.out_bytes', 'datatype' : 'int', 'index' : false },
{ 'name' : 'if_stats.in_bw_usage', 'datatype' : 'int', 'index' : false },
{ 'name' : 'if_stats.out_bw_usage', 'datatype' : 'int', 'index' : false }
]
},
{
Expand All @@ -2009,7 +2008,7 @@ const list<stat_table> _STAT_TABLES = [
'display_name' : 'Analytics API Statistics',
'stat_type' : 'AnalyticsApiStats',
'stat_attr' : 'api_stats',
'obj_table' : 'NONE',
'obj_table' : COLLECTOR_INFO_TABLE,
'attributes' : [
{ 'name' : 'api_stats.operation_type', 'datatype' : 'string', 'index' : true },
{ 'name' : 'api_stats.remote_ip', 'datatype' : 'string', 'index' : true },
Expand All @@ -2030,12 +2029,12 @@ const list<stat_table> _STAT_TABLES = [
{ 'name' : 'api_stats.user', 'datatype' : 'string', 'index' : true },
{ 'name' : 'api_stats.useragent', 'datatype' : 'string', 'index' : true },
{ 'name' : 'api_stats.remote_ip', 'datatype' : 'string', 'index' : true },
{ 'name' : 'api_stats.domain_name', 'datatype' : 'string', 'index' : true },
{ 'name' : 'api_stats.project_name', 'datatype' : 'string', 'index' : true },
{ 'name' : 'api_stats.domain_name', 'datatype' : 'string', 'index' : true, 'suffixes': ['api_stats.project_name'] },
{ 'name' : 'api_stats.project_name', 'datatype' : 'string', 'index' : false },
{ 'name' : 'api_stats.object_type', 'datatype' : 'string', 'index' : true },
{ 'name' : 'api_stats.response_time_in_usec', 'datatype' : 'double', 'index' : true },
{ 'name' : 'api_stats.response_size', 'datatype' : 'int', 'index' : true },
{ 'name' : 'api_stats.response_code', 'datatype' : 'int', 'index' : true }
{ 'name' : 'api_stats.resp_code', 'datatype' : 'string', 'index' : true }
]
},
{
Expand All @@ -2044,8 +2043,8 @@ const list<stat_table> _STAT_TABLES = [
'stat_attr' : 'phy_if_band',
'obj_table' : VROUTER_TABLE,
'attributes': [
{ 'name' : 'name', 'datatype' : 'string', 'index' : true },
{ 'name' : 'phy_if_band.name', 'datatype' : 'string', 'index' : true },
{ 'name' : 'name', 'datatype' : 'string', 'index' : true, 'suffixes': ['phy_if_band.name'] },
{ 'name' : 'phy_if_band.name', 'datatype' : 'string', 'index' : false },
{ 'name' : 'phy_if_band.in_bandwidth_usage', 'datatype' : 'int', 'index' : false },
{ 'name' : 'phy_if_band.out_bandwidth_usage', 'datatype' : 'int', 'index' : false }
]
Expand Down
2 changes: 1 addition & 1 deletion src/config/common/vnc_api_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def collect(self):
project_name=project_name,
response_time_in_usec=response_time_in_usec,
response_size=self.response_size,
response_code=self.response_code,
resp_code=str(self.response_code),
)

def sendwith(self, sandesh):
Expand Down
4 changes: 2 additions & 2 deletions src/config/uve/vnc_api.sandesh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ struct VncApiStats {
7: string object_type (key="ConfigObjectTable")
8: double response_time_in_usec
9: u64 response_size
10: u64 response_code
10: string resp_code
}

/**
Expand All @@ -75,5 +75,5 @@ struct VncApiStats {
* @action: No action needed
*/
objectlog sandesh VncApiStatsLog {
1: VncApiStats api_stats (tags=".operation_type,.user,.useragent,.remote_ip,.domain_name,.project_name,.object_type,.response_time_in_usec,.response_size,.response_code")
1: VncApiStats api_stats (tags=".operation_type,.user,.useragent,.remote_ip,.domain_name:.project_name,.object_type,.response_time_in_usec,.response_size,.resp_code")
}
2 changes: 1 addition & 1 deletion src/vnsw/agent/uve/vrouter.sandesh
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ struct VrouterStatsAgent { // Agent stats
43: optional double total_in_bandwidth_utilization;
44: optional double total_out_bandwidth_utilization;
45: optional VrouterFlowRate flow_rate (tags="")
46: optional list<AgentIfBandwidth> phy_if_band (tags=".name")
46: optional list<AgentIfBandwidth> phy_if_band (tags="name:.name")
}

/**
Expand Down

0 comments on commit e053754

Please sign in to comment.