09-02-2021 09:15 PM
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!
09-03-2021 02:07 AM
@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.
09-03-2021 07:59 AM
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?
09-03-2021 09:51 AM
@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.
09-05-2021 10:50 PM
Hi @bigevilbeard,
Thank you or your input.
We tried with this API:
https://{{vmanage}}:{{port}}/dataservice/statistics/approute/fec/aggregation
query parameter:
09-06-2021 10:05 PM
Hi @bigevilbeard,
Any update on this ?
09-07-2021 11:42 PM
@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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide