getDeviceSwitchPortsStatusesPackets - counters seems strange

yaakov-netop
Here to help

getDeviceSwitchPortsStatusesPackets - counters seems strange

I'm trying to understand the way the API `getDeviceSwitchPortsStatusesPackets` works.

I found this topic https://community.meraki.com/t5/Developers-APIs/How-frequently-are-switch-port-status-packets-update... which says the counter are updated about every 5m.

 

I run a script which send request with timespan=900 for 5 times, with 15m delay between them (total time is 1h). 

Right after it finish, the scripts run request with timespan of 1500, 1800, 2100, 2400, 2700, 3000, 3600.

 

Here is the results of the total counters from my lab:

 

         Total   Sent   Received
-------- ------ ------ ----------

900 #1     4208   2677       1531
900 #2     4283   2726       1557
900 #3     4197   2704       1493
900 #4     3807   2479       1328

900 #5     4201   2679       1522


1500 25m   3989   2622       1367
1800 30m   3989   2622       1367
2100 35m   3989   2622       1367
2400 40m  15755  10293       5462
2700 45m  15755  10293       5462
3000 50m  15755  10293       5462  
3600 60m  15755  10293       5462 

 

I expected that the [1800 30m] will the summarize of [900 #4] and [900 #5], but it doesn't. It's not even close. Pay attention that the last [2100 35m] are less than the last 15m [900 #5]. Is it possible!? 

 

I expected that the [3600 60m] will the summarize of [900 #2] till [900 #5], but it doesn't. It close, but not exactly.

 

I tested it several times, and it always strange. 

 

Am I missing something?

 

 

3 Replies 3
sungod
Kind of a big deal
Kind of a big deal

We know it's not realtime data, but some cached values held in Dashboard, perhaps in 5 minute buckets.

 

The switches will be reporting the Dashboard at some rate/latency, but that timing is not specified in the documentation.

 

Is it the switches that update Dashboard strictly every 5 minutes? or is it that Dashboard gets data from switches 'whenever', and updates the bucket values ever five minutes? how big are the buckets? are they aligned to some epoch? or do they wobble around? It's unclear.

 

In general I find it best not to rely on data for a recent point in time, or for any short period of time, like less than hours, as there's too much uncertainly, mainly due to lack of precise definitions in the documentation.

 

But as you are getting a response that less happened between now and 35 minutes ago, than happened in a 15 minute sub-interval of that 35 minutes, it seems like reason to open a support case!

yaakov-netop
Here to help

Thanks for the answer.

 

So actually, do you recommend to use this API only once for a hour?

In the beginning I thought to use it every 30m.

 

If only Meraki could support intervals for those counters... 😞

 

By the way, I forgot to mention that I'm using REST API, not the meraki package. Does it matter?

 

 

p.s. I'm new here. Is there a guide how to open a support case?

sungod
Kind of a big deal
Kind of a big deal

I've not used that endpoint, but I'd guess it's like others where using shorter time periods can sometimes give odd numbers.

 

Using endpoints direct or with the library should make no difference, the library is just a 'wrapper' around the same endpoints.

 

You open a support case from the Dashboard... click on ? at the top-right of the page, click "Get help & cases", click on the "API and webhooks" button, and there's a button on that page to submit a case.

Get notified when there are additional replies to this discussion.