How to monitor Meraki MX WAN/LAN ports via the API?

John313
Here to help

How to monitor Meraki MX WAN/LAN ports via the API?

Hi, is there a way to get all the WAN/LAN ports status (i.e connected | disconnected) using the API for the Meraki MX devices? I may have missed it but I cant find it on the docs or the SDK, I can get port info using the API for api/v1/networks/{networkID}/appliance/ports/ but it doesn't tell if the port is up or down. Thanks in advance!.

8 REPLIES 8
sungod
Head in the Cloud

It is a bit of a roundabout way, but try...

 

/devices/{serial}/lldpCdp

 

https://developer.cisco.com/meraki/api-v1/#!get-device-lldp-cdp

 

...it may give you what you are after.

 

I just checked against an MX in our lab, it correctly returned all the WAN/LAN ports that are connected.

 

Thanks for the feedback @sungod, unfortunately I'm not getting the same results. I do see some of the active ports but not all.

GreenMan
Meraki Employee
Meraki Employee

Thanks @GreenMan

RaphaelL
Kind of a big deal
Kind of a big deal

You can't. The only way would be using the cdp/lldp endpoint as stated by sungod but this endpoint won't solve 100% of your cases.

Thanks @RaphaelL agree on this.

PatWruk
Getting noticed

The way I do it is with /organizations/[org]/uplinks/statuses

You'll have to parse the results for every device/uplink. But it works well

Thanks @PatWruk this should cover the WAN interface!

Get notified when there are additional replies to this discussion.