lossAndLatencyHistory only supports MX networks

AndriusTWC
Conversationalist

lossAndLatencyHistory only supports MX networks

Hi, I am interested in getting latency and loss data for the MG51 cellular gateway. In API docs I see there is an op for that getDeviceLossAndLatencyHistory. When I call it I get the following response

 

{"errors":["This endpoint only supports MX networks"]}

 

Looking at the docs it does say MX, MG and Z devices. Also the word "networks" implies input should contain a network ID but the URL to call API wants device id rather than network id.

 

It does feel like a bug in the API and/or documentation but perhaps someone had some success with this operation?  

6 Replies 6
alemabrahao
Kind of a big deal
Kind of a big deal

@AndriusTWC 

Take a look at this @RaphaelL 's solution. Maybe it will help you.

 

Solved: Get Device Loss And Latency History Empty Response - The Meraki Community

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
mlefebvre
Building a reputation

I don't have a demo unit next to me at this moment, but looking at the documentation I see 

 

uplink | string

The WAN uplink used to obtain the requested stats. Valid uplinks are wan1, wan2, wan3, cellular. The default is wan1.

 

I am suspicious that to get the MG stats from this endpoint you may have to specify that the uplink is cellular via this parameter.

sungod
Head in the Cloud

I can't get it to work with MG.

 

Tried all interfaces, also confirmed the correct monitoring IP (default 8.8.8.8) using...

 https://developer.cisco.com/meraki/api-v1/get-network-cellular-gateway-connectivity-monitoring-desti...

...but it never returns any data for our lab MG41E.

 

Tbh as we only have MG on MX WAN ports, the effective loss/latency is that of the MX port anyway, but in an application where the MG was not connected to an MX port, it would be good if the call worked on MG too.

 

Feels like a bug, I suggest open a case to report it.

 

AndriusTWC
Conversationalist

@alemabrahao thank you for the suggestion. I understand the problem on the post and it is not the issue I am experiencing. I should have mentioned on my initial post that my API query is not missing the monitored IP address.

 

@mlefebvre thank you for the suggestion. I have tried this again, this time including the uplink=cellular but still getting identical response. It would seem the issue is somewhere else.

 

@sungod that is the case for our environment. We have multiple MG51 gateways on non-MX networks and battling some connection issues. So a detailed historical latency and loss data would be very useful indeed. The live data would be even more useful but API does not seem to even have an operation for that.

 

In fact my end goal is to write a code to monitor cellular link packet loss and latency and if thresholds exceeded execute the failover code. It does feel a little like re-inventing the wheel. But I do not see such capability in the Meraki Dashboard and Solarwinds does not appear to have direct support for MG (yet). If this is OTT and if there is an easier way to achieve this I would really appreciate if someone could share some information.

 

for clarity I use curl for interacting with the API and the exact command line (excluding headers) is as below:

 

curl -L --request GET --url 'https://api.meraki.com/api/v1/devices/XXXX-YYYY-ZZZZ/lossAndLatencyHistory?ip=8.8.8.8&uplink=cellular'

 

replace XXXX-YYYY-ZZZZ with the actual MG51 serial number

 

thank you all! 🙂

AndriusTWC
Conversationalist

I opened the case with support. Will update on the outcome.

MartinS
Getting noticed

Very interested in this - there are a number of holes in the MGs API implementation, this would be a great addition.

---
COO
Highlight - Service Observability Platform
www.highlight.net
Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.