cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Efficient way to monitor switchports

SOLVED
Highlighted
Getting noticed

Efficient way to monitor switchports

I want to be able to fetch switchport data via the API similar to how I would with SNMP, for the 'usual' metrics: 

  • Speed/Duplex
  • Operational / Administrative Status
  • Throughput
  • Error packets / packet types.

All of this is exposed via the API, but to the best of my knowledge, I have to make three separate calls per switch to retrieve all of this info. This isn't a problem, until the rate limiting kicks in. I do have backoff logic in place, but apparently it's not always cutting it.

 

This is what I'm doing, does anyone know of a way to reduce the calls?

 

 

 // Retrieve interface packet counts for the switch.
query('/api/v0/devices/' + device.serial + '/switchPortStatuses/packets?timespan=' + TIMESPAN)

 // Retrieve interface usage counts for the switch
query('/api/v0/devices/' + device.serial + '/switchPortStatuses?timespan=' + TIMESPAN)

// Retrieve interface statuses for the switch. Cannot use the above call because it blanks out 'status' values when a timespan is applied.
query('/api/v0/devices/' + device.serial + '/switchPortStatuses')

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Kind of a big deal

Re: Efficient way to monitor switchports

No way to reduce the API calls sorry.

 

The latest Python SDK does support rate-limiting.

For node.js I use bottleneck to manage it automatically.

View solution in original post

2 REPLIES 2
Highlighted
Kind of a big deal

Re: Efficient way to monitor switchports

No way to reduce the API calls sorry.

 

The latest Python SDK does support rate-limiting.

For node.js I use bottleneck to manage it automatically.

View solution in original post

Highlighted
Getting noticed

Re: Efficient way to monitor switchports

Gotcha, thanks for confirming Philip.
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.