- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
API to monitor WAN port traffic
I would like to pull an API report showing how much data per network is using out of the Internet 1 port and Internet 2 port. Exported in an Excel spreadsheet. Is that possible? We have over 800 networks and I would like to see which network uses the most data and which WAN uplink is being used the most.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,
Yes it looks to be available. https://developer.cisco.com/meraki/api-latest/#!get-network-appliance-uplinks-usage-history
It should provide you the usage of both WAN.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The call @RaphaelL mentions is the one to use, however be a bit careful there are open issues with it, one is that there could be huge errors in the usage data.
For more info see: https://community.meraki.com/t5/Developers-APIs/New-MX-endpoint-Appliance-uplinks-usage-history/m-p/...
The usage data issue has definitely been improving, the last test I did has just a few bad values, so work to resolve it seems to be progressing.
Example bad values for month to date across c. 40 MX devices, this MX67 transfers hundreds of GB in a 600 second period...
datetime | model | uplink | sent | received | timeslice |
06/10/2022 21:10 | MX67 | wan1 | 475,215 | 451,661 | 600 |
06/10/2022 21:20 | MX67 | wan1 | 382,033 | 359,902 | 600 |
06/10/2022 21:30 | MX67 | wan1 | 393,608 | 359,690 | 600 |
06/10/2022 21:40 | MX67 | wan1 | 286,792,286,113 | 173,053,238,131 | 600 |
06/10/2022 21:50 | MX67 | wan1 | 461,091 | 444,982 | 600 |
06/10/2022 22:00 | MX67 | wan1 | 363,149 | 349,026 | 600 |
06/10/2022 22:10 | MX67 | wan1 | 467,008 | 435,564 | 600 |
06/10/2022 22:20 | MX67 | wan1 | 472,300 | 445,367 | 600 |
06/10/2022 22:30 | MX67 | wan1 | 492,821 | 446,611 | 600 |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My goal is to automate this script to run one time a month on the 1st to show the data usage from the previous month. Is this API going to be able to handle this request?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Be aware the maximum lookback stated in the documentation is "31 days", whether this is simply 86400*31 seconds or some other period isn't stated. But if you miss a run for some reason, or there is a network/API/other glitch (these things happen), you may run out of time to recover before losing data.
I recommend use the Python library with async IO to run on all networks concurrently (underlying is rated limited, but the library handles that for you) as you will be issuing call-per-network, this will run faster than network at a time.
Fwiw for testing I currently run it daily with 600 second resolution and build a long-term time series, same as the approach for a number of other things we measure, the automation handles some re-runs itself, or we can recover manually by setting t0-t1 as appropriate.