Meraki API

HumbleNetworkGu
Here to help

Meraki API

Hi, i have a problem when handling alot of MX device multiple places. I want to pull few information like to have all IP Gateway each MX in single interfaces, but MX don't have that features.

 

Other thing is, to check WAN 1 or WAN 2 which is up or down. I cannot see that.

 

My question is, is there any solution for this kind of matter. Can Splunk or using API solve this ?

In the matter of Splunk, does Splunk Add-On in Meraki require to purchase or not ?

 

Thanks

8 Replies 8
nicdc01
Getting noticed

Not sure if this is what you mean.
Can fetch both WAN IPs; Gateway and Status

https://developer.cisco.com/meraki/api-v1/get-organization-appliance-uplink-statuses/


Then sort as needed.

HumbleNetworkGu
Here to help

Hi @nicdc01 , can teach me how to use this method ? As im not very knowledgable using Cisco DevNet. I have try to put my Meraki Org ID. It prompt Error 404

 

nicdc01
Getting noticed

Hey;
Your Org ID can be found on the bottom of any page in your Meraki Dashboard.
404 is most likely it didnt find the org with the ID you didn't put in.

Append this where it shows {organizationId}  in the URL for the request.

If you are still struggling go through the basics before proceeding any further.

https://developer.cisco.com/meraki/api-v1/introduction/#meraki-dashboard-apis


 

HumbleNetworkGu
Here to help

Hi @nicdc01 , past a week already i have manage to use Meraki API in Postman. I am progress learning alot of things and testing pulling specific data in Meraki.

alemabrahao
Kind of a big deal
Kind of a big deal

The Meraki Dashboard API doesn’t directly expose the gateway IP used by MX for WAN1/WAN2 (only the public IPs, uplink status, and interface config are exposed).

You can use the following APIs:

GET /devices/{serial}/uplink

 It returns IP address, public IP, interface type (WAN1 or WAN2), and status (active/inactive/failover). It does not include gateway IP used by ISP, unfortunately.

 

 GET /networks/{networkId}/appliance/uplink/settings

 You’ll get static IP configuration (if configured), possibly including gateway, IP, subnet, DNS. You can monitor which WAN is Up/Down with this same Meraki API.

You can aso script it (Python, PowerShell, etc.) to check WAN status for many devices at once, and,y es, Splunk can help visualize and alert on Meraki data.

You’ll need splunk Meraki Add-On.  The Add-on itself is free on Splunkbase. But Splunk Enterprise or Splunk Cloud may incur licensing costs depending on how much data you ingest.

From Meraki side, you do not need to purchase anything additional, it uses your existing API key.

 

https://splunkbase.splunk.com/app/5580

 

https://documentation.meraki.com/General_Administration/Cross-Platform_Content/Cisco_Meraki_Add-on_f...

 

 

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.
HumbleNetworkGu
Here to help

 GET /networks/{networkId}/appliance/uplink/settings

 

When i run this command, im getting wan1 and wan2 IP from different setting. It doesnt show the public IP on meraki. Please advise

PhilipDAth
Kind of a big deal
Kind of a big deal

This won't give you everything - but maybe enough?  Try going:

 

PhilipDAth_0-1753385086342.png

 

Click on the "Devices" tab, and then the "+" on the right hand side, and add some extra columns like:

Uplink IP (Port 1)

Uplink IP (Port 2)

Contacted At

 

PhilipDAth_1-1753385190542.png

 

 

This will allow you to see any WAN interface that is no longer assigned an IP address (likely down) and how long it has been since the device last checked in to the Merai Dashboard.

Not a perfect solution, but maybe enough?

PhilipDAth
Kind of a big deal
Kind of a big deal
Get notified when there are additional replies to this discussion.