Historic Bandwidth Usage Expressed in Percentages

Here to help

Historic Bandwidth Usage Expressed in Percentages

Hello! I'm working in an alert system that checks whether a network has gone above a certain usage threshold (80% right now) and generates a report to the interested party. Currently Im using two endpoints to accomplish this: "getOrganizationClientsBandwidthUsageHistory" to get the historic usage data (in megabits per second) and "getNetworkApplianceTrafficShapingUplinkBandwidth" to get the maximum usage limits for upload and download (I know the endpoint returns a limit for each client in a network, but here I just take the first set of limits, since the networks we are managing basically set the same limits for all clients).


After retrieving the data, I basically just divide the usage history by the limits (in kilobits per second, but I divide by a 1000 to get megabits) and get the usage history as a percentage. 


The thing is, the usual number of manual overuse reports is around 10, but with this automated system it generated almost 50. I think it may a problem of comparing apples to oranges, so please, if you have any better way to do this or a different endpoint to use, it would be very useful. Thank you!

Kind of a big deal

Hi , 


Just a bit confused on your goal : whether a network has gone above a certain usage threshold (80% right now)

But you seem to be using an endpoint related to client usage : getOrganizationClientsBandwidthUsageHistory

I'm pretty sure that this endpoint will also include inter-vlan traffic and not only 'wan' traffic. 


The other way that I only involves paying for the Insight licences and setting a threshold in Wan health.


I will look at other endpoints in the meantime 

Here to help

Ohhh. Sorry, I dont know too much about networking, so the clients endpoint seemed like a good pick. But you are right, if it also covers inter-vlan traffic its best if I use another endpoint for the historic data.


Do you think that this one would be better? https://developer.cisco.com/meraki/api-v1/#!get-network-clients-usage-histories

What part of the network are you trying to get usage for?


If it is the WAN uplinks, the available endpoint is https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-uplinks-usage-history


This gives usage over a period with resolution as short as 60 seconds.


Be aware that there's an open issue with data accuracy, I've not checked recently but it seemed to be improving last time I tested, presumably as Meraki work to fix the problem.


Okay, thank you! One quick question though: Do you by any chance know what are the units returned by the "getNetworkApplianceTrafficShapingUplinkBandwidth" endpoint? I think its given in kilobits, but Im not sure.

Not used it, but I'd assume kilobits/sec, simplest way to check is get the values and compare to what you see on the corresponding config page in Dashboard.


Thank you. I think you are right. After comparing the values, they seem to be given in kbps. The only thing thats throwing me off is that the "getNetworkApplianceTrafficShapingUplinkBandwidth" is apparently given in bytes, but when I convert it to kilobits (Multiply by 8 and then divide by 1e6 to compare to the limits given in kbps) the percentage values are something like 700000%. I think its obviously wrong... but I dont know where the error might be. Maybe its because the actual unit is not bytes but bits? No idea.

If you give the actual returned values from the request and your equation, might be able to see what the problems is.

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.