Clients Application Usage inconsistency API v1

Manresa
Comes here often

Clients Application Usage inconsistency API v1

I am trying to get the application usage of the clients of a network, but I am obtaining very inconsistent results.

I want to know the application usage between moment a and moment b.

If I make the request with t0=a and t1=bI get a certain application usage.

If I use a moment c that is in the middle between a and b and make two request: the first with t0=a and t1=c, and the second with t0=c and t1=b, the total application usage is nowhere near to the one I get with a single request, either be more or less.

 

And since the response of the request doesn't specify the time interval of the usage returned, I have to assume that the usage returned belongs to the interval passed in the request.

 

Any idea why this inconsistency is happening? And any idea of how can I solve it?

 

Thanks 

4 Replies 4
sungod
Kind of a big deal

What duration(s) are you requesting data for? i.e. how long are b-a, c-a ?

 

Even though you may specify a t0/t1 with one-second precision, the data returned may be truncated/extended/averaged depending on the internal selection algorithms and sample 'bucket' sizes of the raw data.

 

The shorter the requested duration, the greater the effect would be. For long durations it would be odd to have a big mismatch, though big usage spikes at the boundary could still skew things.

 

You could try using...

 

/networks/{networkID}/clients/usageHistories

 

...it returns a time series of usage data for a specified client (or clients), I did a quick check and it was returning 20-second samples. Then with this data try comparing to the application usage reported for the same client and see if it helps make sense of what is going on

 

Manresa
Comes here often

I am not using short durations because it returns an empty usage. a-b can be one day, two days, even 5 days and the inconsistency is still happening. I would like an interval of one hour, but that always returns an empty usage, so I am trying with intervals of 6 hours or more.

 

I am already using /networks/{networkID}/clients/usageHistories and the returned values are consistent, logical and expected.

 

The problem that I am having it seems to be only with the application usage and it doesn't seem to match much with the usage history in some intervals, no matter their size.

 

I know there is a request /networks/:networkId/clients/:clientId/trafficHistory that gives, among other things, the daily application usage for a single client but I rather use the other option because I was hopping to get the data in a smaller granularity and make the request for multiple users at the same time.

I have yet to verify that this variant gives the expected results. 

sungod
Kind of a big deal

Have you tried with both V0 and V1 endpoints?

 

The reason I say this is that I have a case open at the moment because a different API call in V1 has recently stopped returning correct data, whereas in V0 it still works.

 

May not help you, but if you get different results V0/V1 then it is a sign there may be a fault.

 

Otherwise perhaps one of the Meraki people in the community can explain the internal logic behind how application usage is calculated.

 

If not, you may need to open a case and ask why the results are inconsistent.

Manresa
Comes here often

I have tried V0, but it seems the application usage request is new to V1, or at least I couldn't find it in V0.

The only way I found to get the application usage in V0 is with the traffic usage request, but just like V1 it is daily and for one client at the time.

 

Thank you for help. If I don't get an answer here, then I'll open a case.

Get notified when there are additional replies to this discussion.