Get Device Loss And Latency History Empty Response

Solved
MediWat
Conversationalist

Get Device Loss And Latency History Empty Response

Hello,

 

I am attempting to collect data from the API call 'getDeviceLossAndLatencyHistory', specifically the "losspercent" response.  I have tried making the call via Python (script below) and directly on the Meraki Devnet portal (Cisco Meraki - Create with the Meraki Platform)  but the response is [] for both methods.  All of the other calls that I have tried return the expected data, just this one gives the empty response.  I have tried using different network ID, Serial, and IP sets.  I have also tried entering different timespan and resolution parameters with the same result.  There are a couple of other articles listed here, but they didn't seem to have pertinent answers.  If anyone can assist with this it would be greatly appreciated.

 

 

import requests
import json

 

BASE_URL = 'https://api.meraki.com/api/v1'
headers = { 'X-Cisco-Meraki-API-Key': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' }
RESOURCE = '/organizations'

call_response = requests.get('https://api.meraki.com/api/v1/networks/L_xxxxxxxxxxxxxxxx/devices/XXXX-XXXX-XXXX/lossAndLatencyHisto...', headers = headers)

 

parsed_response = json.loads(call_response.text)

print(parsed_response)

 

 

1 Accepted Solution
RaphaelL
Kind of a big deal
Kind of a big deal

Just tried it and works like a charm ! 

 

RaphaelL_0-1654001235129.png

Are you sure that the provided ip=X.X.X.X has been configured on your MX ? ( SD-WAN & Trafic shaping ) : 

 

RaphaelL_1-1654001301237.png

 

View solution in original post

3 Replies 3
RaphaelL
Kind of a big deal
Kind of a big deal

Just tried it and works like a charm ! 

 

RaphaelL_0-1654001235129.png

Are you sure that the provided ip=X.X.X.X has been configured on your MX ? ( SD-WAN & Trafic shaping ) : 

 

RaphaelL_1-1654001301237.png

 

sungod
Kind of a big deal

You need to specify the destination IP, it's mandatory.

 

For instance, if I get the details for a few minutes for WAN 1 on an MX that is set to use 8.8.8.8 for it's latency reporting, with query parameters...

 

timespan 1200, resolution 60, interface wan1, ip 8.8.8.8

 

I get...

 

[
{
"startTs": "2022-05-31T12:48:00Z",
"endTs": "2022-05-31T12:49:00Z",
"lossPercent": null,
"latencyMs": null,
"goodput": null,
"jitter": null
},
{
"startTs": "2022-05-31T12:49:00Z",
"endTs": "2022-05-31T12:50:00Z",
"lossPercent": 0,
"latencyMs": 13.96,
"goodput": 100000,
"jitter": 0.35
},
{
"startTs": "2022-05-31T12:50:00Z",
"endTs": "2022-05-31T12:51:00Z",
"lossPercent": 0,
"latencyMs": 13.92,
"goodput": 100000,
"jitter": 0.38
},
{
"startTs": "2022-05-31T12:51:00Z",
"endTs": "2022-05-31T12:52:00Z",
"lossPercent": 0,
"latencyMs": 13.95,
"goodput": 100000,
"jitter": 0.34
},
{
"startTs": "2022-05-31T12:52:00Z",
"endTs": "2022-05-31T12:53:00Z",
"lossPercent": 0,
"latencyMs": 14.04,
"goodput": 100000,
"jitter": 0.53
},
{
"startTs": "2022-05-31T12:53:00Z",
"endTs": "2022-05-31T12:54:00Z",
"lossPercent": 0,
"latencyMs": 13.9,
"goodput": 100000,
"jitter": 0.28
},
{
"startTs": "2022-05-31T12:54:00Z",
"endTs": "2022-05-31T12:55:00Z",
"lossPercent": 0,
"latencyMs": 13.87,
"goodput": 100000,
"jitter": 0.35
},
{
"startTs": "2022-05-31T12:55:00Z",
"endTs": "2022-05-31T12:56:00Z",
"lossPercent": 0,
"latencyMs": 13.91,
"goodput": 100000,
"jitter": 0.21
},
{
"startTs": "2022-05-31T12:56:00Z",
"endTs": "2022-05-31T12:57:00Z",
"lossPercent": 0,
"latencyMs": 13.85,
"goodput": 100000,
"jitter": 0.29
},
{
"startTs": "2022-05-31T12:57:00Z",
"endTs": "2022-05-31T12:58:00Z",
"lossPercent": 0,
"latencyMs": 13.94,
"goodput": 100000,
"jitter": 0.3
}
]

 

MediWat
Conversationalist

Thank you for the quick repsonses!  This was the issue, I didn't undestand the IP parameter was for the uplink statistics destination, not for the public IP assigned to that WAN interface.  This is working for me now, thank very much!

Get notified when there are additional replies to this discussion.