cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1149
Views
0
Helpful
6
Replies

Issue to execute statistics for top application per tunnel API

raihanAbidin
Level 1
Level 1

Hi,

I have tried the API below to get the statistics for top applications per tunnel from the reserved sd-wan sandbox.

https://{{vmanage}}:{{port}}/dataservice/​statistics​/approute​/device​/tunnel​/summary?deviceId=10.10.11.17

But getting message as "invalid query"

    "message": "invalid query",

    "details": "Missing parameter device Id".

    "code": "ELASTIC0007"

Checked the example from this link

https://developer.cisco.com/docs/sdwan/#!reference-device-state-and-statistics

but couldn't find further info to pass the query filter.

 

Appreciate any pointers on this. Thanks!

6 Replies 6

@raihanAbidin your issue is not the sandbox, but you are passing the wrong data in your request. The correct way is as follows.

 

https://{{vmanage}}:{{port}}/dataservice/statistics/approute/transport/summary/10.10.1.13

Output

 

{
    "header": {
        "generatedOn": 1630659662457,
        "viewKeys": {
            "uniqueKey": [],
            "preferenceKey": "grid-approute_histogram"
        },
        "columns": [
            {
                "title": "Tunnel Color",
                "property": "color",
                "hideable": false,
                "dataType": "string"
            },
            {
                "title": "Avg. Loss (%)",
                "property": "loss_percentage",
                "hideable": false,
                "dataType": "number"
            },
            {
                "title": "Avg. Latency (ms)",
                "property": "latency",
                "hideable": false,
                "dataType": "number"
            },
            {
                "title": "Avg. Jitter (ms)",
                "property": "jitter",
                "hideable": false,
                "dataType": "number"
            },
            {
                "title": "Event time",
                "property": "entry_time",
                "displayFormat": "DD MMM YYYY h:mm:ss A z",
                "inputFormat": "unix-time",
                "dataType": "date"
            }
        ],
        "fields": [
            {
                "property": "color",
                "dataType": "string"
            },
            {
                "property": "loss_percentage",
                "dataType": "number"
            },
            {
                "property": "latency",
                "dataType": "number"
            },
            {
                "property": "jitter",
                "dataType": "number"
            },
            {
                "property": "entry_time",
                "dataType": "date"
            }
        ],
        "chart": {
            "xAxis": [
                "entry_time"
            ],
            "yAxis": [
                "loss_percentage",
                "latency",
                "jitter"
            ],
            "series": [
                "color"
            ],
            "title": "Transport health",
            "xAxisLabel": "Time",
            "yAxisLabel": ""
        }
    },
    "data": []
}

 

Hope this helps.

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Hi @bigevilbeard

Thanks for the pointers. Have tried and get the same output but it seems the data is empty.

 "data": []

Application has been configured as we can see data in the Application dashboard in vManage dashboard. Anything that we missed?

 

@raihanAbidin in the sandbox i see no data (from the vManage UI). You could use the following POST request which is prefered

 

https://{{vmanage}}:{{port}}/dataservice/statistics/approute/fec/aggregation
{
  "header": {
    "generatedOn": 1630687696314,
    "columns": [
      {
        "property": "fec_re",
        "title": "Fec_re",
        "dataType": "number",
        "isDisplay": true
      },
      {
        "property": "fec_tx",
        "title": "Fec_tx",
        "dataType": "number",
        "isDisplay": true
      },
      {
        "property": "latency",
        "title": "Latency",
        "dataType": "number",
        "isDisplay": true
      },
      {
        "property": "name",
        "title": "Name",
        "dataType": "string",
        "isDisplay": true
      },
      {
        "property": "fec_rx",
        "title": "Fec_rx",
        "dataType": "number",
        "isDisplay": true
      }
    ],
    "fields": [
      {
        "property": "fec_re",
        "dataType": "number"
      },
      {
        "property": "fec_tx",
        "dataType": "number"
      },
      {
        "property": "latency",
        "dataType": "number"
      },
      {
        "property": "name",
        "dataType": "string"
      },
      {
        "property": "fec_rx",
        "dataType": "number"
      }
    ]
  },
  "data": [
    {
      "latency": 2.827751196172249,
      "name": "10.10.1.17:public-internet-10.10.1.13:public-internet",
      "count": 209,
      "fecLossRecovery": "-"
    },
    {
      "latency": 2.057894736842105,
      "name": "10.10.1.11:public-internet-10.10.1.15:public-internet",
      "count": 190,
      "fecLossRecovery": "-"
    },
    {
      "latency": 2.098445595854922,
      "name": "10.10.1.13:public-internet-10.10.1.15:public-internet",
      "count": 193,
      "fecLossRecovery": "-"
    },
    {
      "latency": 2.154639175257732,
      "name": "10.10.1.17:mpls-10.10.1.15:public-internet",
      "count": 97,
      "fecLossRecovery": "-"
    },
    {
      "latency": 2.1649484536082473,
      "name": "10.10.1.17:mpls-10.10.1.13:public-internet",
      "count": 97,
      "fecLossRecovery": "-"
    },
    {
      "latency": 2.073170731707317,
      "name": "10.10.1.11:public-internet-10.10.1.17:mpls",
      "count": 164,
      "fecLossRecovery": "-"
    },
    {
      "latency": 4.452261306532663,
      "name": "10.10.1.13:public-internet-10.10.1.17:public-internet",
      "count": 199,
      "fecLossRecovery": "-"
    },
    {
      "latency": 2.0677083333333335,
      "name": "10.10.1.13:public-internet-10.10.1.11:public-internet",
      "count": 192,
      "fecLossRecovery": "-"
    },
    {
      "latency": 2.064516129032258,
      "name": "10.10.1.11:public-internet-10.10.1.13:public-internet",
      "count": 186,
      "fecLossRecovery": "-"
    },
    {
      "latency": 2.0172413793103448,
      "name": "10.10.1.15:public-internet-10.10.1.17:mpls",
      "count": 174,
      "fecLossRecovery": "-"
    },
    {
      "latency": 2.823809523809524,
      "name": "10.10.1.17:public-internet-10.10.1.11:public-internet",
      "count": 210,
      "fecLossRecovery": "-"
    },
    {
      "latency": 2.088397790055249,
      "name": "10.10.1.15:public-internet-10.10.1.11:public-internet",
      "count": 181,
      "fecLossRecovery": "-"
    },
    {
      "latency": 4.338383838383838,
      "name": "10.10.1.11:public-internet-10.10.1.17:public-internet",
      "count": 198,
      "fecLossRecovery": "-"
    },
    {
      "latency": 2.8181818181818183,
      "name": "10.10.1.17:public-internet-10.10.1.15:public-internet",
      "count": 209,
      "fecLossRecovery": "-"
    },
    {
      "latency": 4.348717948717948,
      "name": "10.10.1.15:public-internet-10.10.1.17:public-internet",
      "count": 195,
      "fecLossRecovery": "-"
    },
    {
      "latency": 2.0725388601036268,
      "name": "10.10.1.15:public-internet-10.10.1.13:public-internet",
      "count": 193,
      "fecLossRecovery": "-"
    },
    {
      "latency": 2.1604938271604937,
      "name": "10.10.1.17:mpls-10.10.1.11:public-internet",
      "count": 81,
      "fecLossRecovery": "-"
    },
    {
      "latency": 2.0112359550561796,
      "name": "10.10.1.13:public-internet-10.10.1.17:mpls",
      "count": 178,
      "fecLossRecovery": "-"
    }
  ]
}

Hope this helps.

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Ashwini3
Level 1
Level 1

Hi @bigevilbeard

Thank you or your input. 
We tried with this API:
https://{{vmanage}}:{{port}}/dataservice/statistics/approute/fec/aggregation


query parameter:

{"query":{"condition":"AND","rules":[{"value":["1"],"field":"entry_time","type":"date","operator":"last_n_hours"},{"value":["10.10.1.11"],"field":"vdevice_name","type":"string","operator":"in"}]},"aggregation":{"field":[{"property":"name","sequence":1,"size":50},{"property":"proto","sequence":2}],"metrics":[{"property":"loss_percentage","type":"avg"},{"property":"vqoe_score","type":"avg"},{"property":"latency","type":"avg"},{"property":"jitter","type":"avg"},{"property":"rx_octets","type":"sum"},{"property":"tx_octets","type":"sum"}]}}
 
API response : 
{
    "header": {
        "generatedOn"1630906744890,
        "columns": [
            {
                "property""fec_re",
                "title""Fec_re",
                "dataType""number",
                "isDisplay"true
            },
            {
                "property""vqoe_score",
                "title""Vqoe_score",
                "dataType""number",
                "isDisplay"true
            },
            {
                "property""fec_tx",
                "title""Fec_tx",
                "dataType""number",
                "isDisplay"true
            },
            {
                "property""jitter",
                "title""Jitter",
                "dataType""number",
                "isDisplay"true
            },
            {
                "property""rx_octets",
                "title""Rx_octets",
                "dataType""number",
                "isDisplay"true
            },
            {
                "property""loss_percentage",
                "title""Loss_percentage",
                "dataType""number",
                "isDisplay"true
            },
            {
                "property""proto",
                "title""Proto",
                "dataType""string",
                "isDisplay"true
            },
            {
                "property""latency",
                "title""Latency",
                "dataType""number",
                "isDisplay"true
            },
            {
                "property""name",
                "title""Name",
                "dataType""string",
                "isDisplay"true
            },
            {
                "property""fec_rx",
                "title""Fec_rx",
                "dataType""number",
                "isDisplay"true
            },
            {
                "property""tx_octets",
                "title""Tx_octets",
                "dataType""number",
                "isDisplay"true
            }
        ],
        "fields": [
            {
                "property""fec_re",
                "dataType""number"
            },
            {
                "property""vqoe_score",
                "dataType""number"
            },
            {
                "property""fec_tx",
                "dataType""number"
            },
            {
                "property""jitter",
                "dataType""number"
            },
            {
                "property""rx_octets",
                "dataType""number"
            },
            {
                "property""loss_percentage",
                "dataType""number"
            },
            {
                "property""proto",
                "dataType""string"
            },
            {
                "property""latency",
                "dataType""number"
            },
            {
                "property""name",
                "dataType""string"
            },
            {
                "property""fec_rx",
                "dataType""number"
            },
            {
                "property""tx_octets",
                "dataType""number"
            }
        ]
    },
    "data": [
        {
            "loss_percentage"0,
            "latency"1,
            "count"1,
            "tx_octets"0,
            "jitter"0,
            "rx_octets"5752,
            "proto""IPSEC",
            "name""10.10.1.11:mpls-10.10.1.15:mpls",
            "fecLossRecovery""-",
            "vqoe_score"10
        },
        {
            "loss_percentage"0.15,
            "latency"202,
            "count"1,
            "tx_octets"0,
            "jitter"1,
            "rx_octets"9390,
            "proto""IPSEC",
            "name""10.10.1.11:public-internet-10.10.1.13:public-internet",
            "fecLossRecovery""-",
            "vqoe_score"3
        },
        {
            "loss_percentage"0,
            "latency"2,
            "count"1,
            "tx_octets"0,
            "jitter"1,
            "rx_octets"7624,
            "proto""IPSEC",
            "name""10.10.1.11:mpls-10.10.1.15:public-internet",
            "fecLossRecovery""-",
            "vqoe_score"10
        },
        {
            "loss_percentage"0.075,
            "latency"2,
            "count"2,
            "tx_octets"0,
            "jitter"0.5,
            "rx_octets"0,
            "proto""IPSEC",
            "name""10.10.1.11:mpls-10.10.1.17:public-internet",
            "fecLossRecovery""-",
            "vqoe_score"9
        },
        {
            "loss_percentage"0,
            "latency"202,
            "count"1,
            "tx_octets"0,
            "jitter"1,
            "rx_octets"4994,
            "proto""IPSEC",
            "name""10.10.1.11:public-internet-10.10.1.15:public-internet",
            "fecLossRecovery""-",
            "vqoe_score"6
        },
        {
            "loss_percentage"0.452,
            "latency"202,
            "count"1,
            "tx_octets"0,
            "jitter"1,
            "rx_octets"0,
            "proto""IPSEC",
            "name""10.10.1.11:public-internet-10.10.1.17:public-internet",
            "fecLossRecovery""-",
            "vqoe_score"2
        },
        {
            "loss_percentage"0.151,
            "latency"203,
            "count"1,
            "tx_octets"0,
            "jitter"1,
            "rx_octets"6508,
            "proto""IPSEC",
            "name""10.10.1.11:public-internet-10.10.1.15:mpls",
            "fecLossRecovery""-",
            "vqoe_score"3
        },
        {
            "loss_percentage"0,
            "latency"1,
            "count"1,
            "tx_octets"0,
            "jitter"0,
            "rx_octets"5705,
            "proto""IPSEC",
            "name""10.10.1.11:mpls-10.10.1.13:mpls",
            "fecLossRecovery""-",
            "vqoe_score"10
        },
        {
            "loss_percentage"0.0755,
            "latency"1,
            "count"2,
            "tx_octets"0,
            "jitter"0,
            "rx_octets"72162,
            "proto""IPSEC",
            "name""10.10.1.11:mpls-10.10.1.17:mpls",
            "fecLossRecovery""-",
            "vqoe_score"9
        },
        {
            "loss_percentage"0.303,
            "latency"203,
            "count"1,
            "tx_octets"0,
            "jitter"1,
            "rx_octets"8846,
            "proto""IPSEC",
            "name""10.10.1.11:public-internet-10.10.1.13:mpls",
            "fecLossRecovery""-",
            "vqoe_score"2
        },
        {
            "loss_percentage"0.151,
            "latency"203,
            "count"1,
            "tx_octets"0,
            "jitter"1,
            "rx_octets"0,
            "proto""IPSEC",
            "name""10.10.1.11:public-internet-10.10.1.17:mpls",
            "fecLossRecovery""-",
            "vqoe_score"3
        },
        {
            "loss_percentage"0,
            "latency"2,
            "count"1,
            "tx_octets"0,
            "jitter"0,
            "rx_octets"7459,
            "proto""IPSEC",
            "name""10.10.1.11:mpls-10.10.1.13:public-internet",
            "fecLossRecovery""-",
            "vqoe_score"10
        }
    ]
}
 
I have enabled the Application configuration to get the data ,on application dashboard can see the data for following devices :
10.10.1.15
10.10.1.13
10.10.1.17

But when try to execute following rest API getting "data []" as empty.
https://{{vmanage}}:{{port}}/dataservice/statistics/approute/transport/summary/10.10.1.13
 
{
    "header": {
        "generatedOn"1630907201342,
        "viewKeys": {
            "uniqueKey": [],
            "preferenceKey""grid-approute_histogram"
        },
        "columns": [
            {
                "title""Tunnel Color",
                "property""color",
                "hideable"false,
                "dataType""string"
            },
            {
                "title""Avg. Loss (%)",
                "property""loss_percentage",
                "hideable"false,
                "dataType""number"
            },
            {
                "title""Avg. Latency (ms)",
                "property""latency",
                "hideable"false,
                "dataType""number"
            },
            {
                "title""Avg. Jitter (ms)",
                "property""jitter",
                "hideable"false,
                "dataType""number"
            },
            {
                "title""Event time",
                "property""entry_time",
                "displayFormat""DD MMM YYYY h:mm:ss A z",
                "inputFormat""unix-time",
                "dataType""date"
            }
        ],
        "fields": [
            {
                "property""color",
                "dataType""string"
            },
            {
                "property""loss_percentage",
                "dataType""number"
            },
            {
                "property""latency",
                "dataType""number"
            },
            {
                "property""jitter",
                "dataType""number"
            },
            {
                "property""entry_time",
                "dataType""date"
            }
        ],
        "chart": {
            "xAxis": [
                "entry_time"
            ],
            "yAxis": [
                "loss_percentage",
                "latency",
                "jitter"
            ],
            "series": [
                "color"
            ],
            "title""Transport health",
            "xAxisLabel""Time",
            "yAxisLabel"""
        }
    },
    "data": []
}
 
 
Is there anything that we are missing to configure ?
 
 

 

Ashwini3
Level 1
Level 1

Hi @bigevilbeard
Any update on this ?

@Ashwini3 @raihanAbidin For setting up ARR please see this guide https://www.cisco.com/c/en/us/td/docs/routers/sdwan/configuration/policies/vedge/policies-book/application-aware-routing.html if you are unsure you can get support for configuration via TAC or the https://community.cisco.com/t5/sd-wan-and-cloud-networking/bd-p/discussions-sd-wan community.

 

I tested this on a later version (20.5) of SD-WAN there was no proper payload checking in past versions/older, so it is misleading when you using the deviceId that this is the correct 'type' as you were getting a '200 ok'. The 'type' in the API call should be latency or loss_percentage or jitter. For example:

 

https://{{vmanage}}:{{port}}/dataservice/statistics/approute/transport/summary/latency

 

Use the query

 

 

{
  "query": {
    "condition": "AND",
    "rules": [
      {
        "value": [
          "24"
        ],
        "field": "entry_time",
        "type": "date",
        "operator": "last_n_hours"
      }
    ]
  }
}

 

 

You can test this in the vManage UI in the https://{{vmanage}}:{{port}}//apidocs under the 

'Monitoring - Application-Aware Routing Statistics' field.
 
As this is not a fault with the DevNet Sandbox - please use the above SD-WAN community for questions related to SD-WAN configuration. You can also raise a support case for this here https://developer.cisco.com/site/support/
 
Hope this helps.

 

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io