Sort is not working for stats query

Bug #1624502 reported by VishnuVardhan V
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.1
New
Medium
mkheni
R3.2
New
Medium
mkheni
R4.0
New
Medium
mkheni
R4.1
New
Medium
mkheni
Trunk
New
Medium
mkheni

Bug Description

Sort is not working for stats query.Following query is returning same result for sort is 1 or 2.

{"table":"StatTable.SandeshMessageStat.msg_info","start_time":1474024800000000,"end_time":1474032000000000,"select_fields":["SUM(msg_info.messages)","msg_info.type"],"filter":[[]],"where":[[{"name":"name","value":"","op":7}]],"sort_fields":["SUM(msg_info.messages)"],"sort":1}.

Result

{
  "value": [
    {
      "msg_info.type": "LinkOper",
      "SUM(msg_info.messages)": 1
    },
    {
      "msg_info.type": "AlarmTrace",
      "SUM(msg_info.messages)": 1
    },
    {
      "msg_info.type": "ContrailConfigTrace",
      "SUM(msg_info.messages)": 1
    },
    {
      "msg_info.type": "VncApiConfigLog",
      "SUM(msg_info.messages)": 2
    },
    {
      "msg_info.type": "SvcMonitorLog",
      "SUM(msg_info.messages)": 2
    },
    {
      "msg_info.type": "IFMapServerConnection",
      "SUM(msg_info.messages)": 4
    },
    {
      "msg_info.type": "IFMapNodeOperation",
      "SUM(msg_info.messages)": 4
    },
    {
      "msg_info.type": "IFMapChannelProcResp",
      "SUM(msg_info.messages)": 4
    },
    {
      "msg_info.type": "QueryPerfInfo",
      "SUM(msg_info.messages)": 8
    },
    {
      "msg_info.type": "QEQueryLog",
      "SUM(msg_info.messages)": 24
    },
    {
      "msg_info.type": "QELog",
      "SUM(msg_info.messages)": 105
    },
    {
      "msg_info.type": "AlarmgenStatusTrace",
      "SUM(msg_info.messages)": 120
    },
    {
      "msg_info.type": "XMPPPeerInfo",
      "SUM(msg_info.messages)": 120
    },
    {
      "msg_info.type": "BGPRouterInfo",
      "SUM(msg_info.messages)": 120
    },
    {
      "msg_info.type": "ControlCpuStateTrace",
      "SUM(msg_info.messages)": 120
    },
    {
      "msg_info.type": "CassandraStatusUVE",
      "SUM(msg_info.messages)": 120
    },
    {
      "msg_info.type": "DatabaseUsage",
      "SUM(msg_info.messages)": 120
    },
    {
      "msg_info.type": "ComputeCpuStateTrace",
      "SUM(msg_info.messages)": 120
    },
    {
      "msg_info.type": "PeerStatsUve",
      "SUM(msg_info.messages)": 120
    },
    {
      "msg_info.type": "CollectorInfo",
      "SUM(msg_info.messages)": 121
    },
    {
      "msg_info.type": "CollectorDbStatsTrace",
      "SUM(msg_info.messages)": 132
    },
    {
      "msg_info.type": "VirtualMachineStatsTrace",
      "SUM(msg_info.messages)": 240
    },
    {
      "msg_info.type": "UveVirtualMachineAgentTrace",
      "SUM(msg_info.messages)": 240
    },
    {
      "msg_info.type": "VrouterStats",
      "SUM(msg_info.messages)": 360
    },
    {
      "msg_info.type": "ConfigCpuStateTrace",
      "SUM(msg_info.messages)": 360
    },
    {
      "msg_info.type": "VncApiStatsLog",
      "SUM(msg_info.messages)": 416
    },
    {
      "msg_info.type": "UveVMInterfaceAgentTrace",
      "SUM(msg_info.messages)": 480
    },
    {
      "msg_info.type": "UveVirtualNetworkAgentTrace",
      "SUM(msg_info.messages)": 480
    },
    {
      "msg_info.type": "AnalyticsCpuStateTrace",
      "SUM(msg_info.messages)": 481
    },
    {
      "msg_info.type": "ModuleCpuStateTrace",
      "SUM(msg_info.messages)": 841
    },
    {
      "msg_info.type": "IFMapDSResp",
      "SUM(msg_info.messages)": 885
    },
    {
      "msg_info.type": "NodeStatusUVE",
      "SUM(msg_info.messages)": 2036
    },
    {
      "msg_info.type": "VncApiError",
      "SUM(msg_info.messages)": 2125
    },
    {
      "msg_info.type": "SandeshModuleServerTrace",
      "SUM(msg_info.messages)": 2280
    },
    {
      "msg_info.type": "SandeshMessageStat",
      "SUM(msg_info.messages)": 2280
    },
    {
      "msg_info.type": "SandeshModuleClientTrace",
      "SUM(msg_info.messages)": 4195
    },
    {
      "msg_info.type": "discClientLog",
      "SUM(msg_info.messages)": 4738
    },
    {
      "msg_info.type": "AlarmgenUpdate",
      "SUM(msg_info.messages)": 4800
    },
    {
      "msg_info.type": "discServiceLog",
      "SUM(msg_info.messages)": 21555
    },
    {
      "msg_info.type": "AnalyticsApiStats",
      "SUM(msg_info.messages)": 98008
    }
  ]
}

Tags: analytics
Changed in juniperopenstack:
assignee: nobody → Raj Reddy (rajreddy)
tags: added: analytics
information type: Proprietary → Public
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.