Is it possible to monitor bandwidth on Wan 1 and 2 via API?

SOLVED
ESonemann
Here to help

Is it possible to monitor bandwidth on Wan 1 and 2 via API?

 
hello Meraki community. Can you help me?
 
 
I need to monitor the download and upload bandwidth of each WAN link via API.
 
I am still looking for an API that show bandwidth utilization on the MX WAN ports.
can you let me know if this is possible?
1 ACCEPTED SOLUTION
MTaylor
Here to help

I use the calculation below to get the value in mega bits per second.

In your example for "wan1 sent" traffic the timestamps indicate you used the default resolution of 60. 

 

result / (resolution * 125000) = Mbps

1562063 / (60 * 125000) = 0.21 Mbps

 

I seem to recall getting a lot of null values when I used the default resolution and timespan, like the data sometimes hasn't been saved to the meraki database, so I normally use 300 or higher for my resolution and couple that with the timespan value depending on how many data points you want returned.

 

I also noticed some really high values that seem to be out of range, maybe due to a counter reset, so you'll need to handle those exceptions as well.

 

 

View solution in original post

8 REPLIES 8
sungod
Head in the Cloud

Thanks Sungod.

 
Do I need to enable early access for an organization?



https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-uplinks-usage-by-network

sungod
Head in the Cloud

Yes, the early-access option needs to be enabled.

Hi Sungod. Thank you! Can you tell me how I get to the bandwidth usage calculation with this API

https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-uplinks-usage-history

?

ESonemann_0-1671736630346.png

In this case I have to add the bytes sent + those received and divide by time?
would that give the average bandwidth consumption within those 60 seconds?

MTaylor
Here to help

I use the calculation below to get the value in mega bits per second.

In your example for "wan1 sent" traffic the timestamps indicate you used the default resolution of 60. 

 

result / (resolution * 125000) = Mbps

1562063 / (60 * 125000) = 0.21 Mbps

 

I seem to recall getting a lot of null values when I used the default resolution and timespan, like the data sometimes hasn't been saved to the meraki database, so I normally use 300 or higher for my resolution and couple that with the timespan value depending on how many data points you want returned.

 

I also noticed some really high values that seem to be out of range, maybe due to a counter reset, so you'll need to handle those exceptions as well.

 

 

Tranks Taylor.

 

 

ESonemann_1-1671747394354.png

this example above I would have in wan 1 sent:

118890582/(300*125000) = 3.17 Mbps.
Is my calculation correct?

Could you tell me, please, where did the value 125000 come from?
 
MTaylor
Here to help

1 byte per 8 bits, right?

1/8 = 0.125

Since we want it in Mbps as that's how most ISP circuits are defined.

1,000,000 / 8,000,000 = 125,000

 

 

Thanks Taylor. 

Is it possible to also monitor the bandwidth inside the VPN tunnel via API?

Get notified when there are additional replies to this discussion.