About Network usage

SOLVED
Gwangjin
Here to help

About Network usage

I have been collecting data usage using Meraki Dashboard API for a month.

But the usage I collected is too different from Meraki Dashboard.

 

Which API should I use to get the usage on the two screens below?

 

  1) View all networks

     Gwangjin_0-1617695783174.png

 

  2) Network-wide → Clients

     Gwangjin_1-1617695824841.png

 

The APIs I currently use are 'Get_Network_traffic' and 'Get_Network_Client'.

If you can help me, please reply.

1 ACCEPTED SOLUTION

Accepted Solutions
sungod
Getting noticed

Re: About Network usage

Based on what I see on some of our demo networks, the network usage figure on the Organization->Overview is the sum of all traffic over seven days, probably a cached value rather than real time, i.e. updated on some schedule, not when the page is redrawn.

 

You could use https://developer.cisco.com/meraki/api-v1/#!get-network-traffic with timespan set to 604800 then simply sum the sent and recv for each application.

 

Note that this call requires traffic analysis with hostname visibility to be enabled on the network(s) you want to get data for.

 

I just tested it on one of our lab networks...

 

Sum of API data 48,986,330 KB

 

Figure in overview 46.84 GB, it's lower, but if it is a cached value that would be expected.

 

Btw my experience is that trying to externally match figures displayed by orchestrator screens (not only Meraki) is often futile...

 

i) The orchestrator is unlikely to be using the external API, nor the basis of internal calculations publicly documented.

 

ii) The orchestrator may not be showing the correct numbers anyway! There's a non-Cisco orchestrator that has been misreporting traffic for years, by huge amounts, both in its user interface and in what is accessed via API, it took a while before the vendor accepted our evidence, even longer to find the cause and fix it.

 

View solution in original post

3 REPLIES 3
sungod
Getting noticed

Re: About Network usage

Based on what I see on some of our demo networks, the network usage figure on the Organization->Overview is the sum of all traffic over seven days, probably a cached value rather than real time, i.e. updated on some schedule, not when the page is redrawn.

 

You could use https://developer.cisco.com/meraki/api-v1/#!get-network-traffic with timespan set to 604800 then simply sum the sent and recv for each application.

 

Note that this call requires traffic analysis with hostname visibility to be enabled on the network(s) you want to get data for.

 

I just tested it on one of our lab networks...

 

Sum of API data 48,986,330 KB

 

Figure in overview 46.84 GB, it's lower, but if it is a cached value that would be expected.

 

Btw my experience is that trying to externally match figures displayed by orchestrator screens (not only Meraki) is often futile...

 

i) The orchestrator is unlikely to be using the external API, nor the basis of internal calculations publicly documented.

 

ii) The orchestrator may not be showing the correct numbers anyway! There's a non-Cisco orchestrator that has been misreporting traffic for years, by huge amounts, both in its user interface and in what is accessed via API, it took a while before the vendor accepted our evidence, even longer to find the cause and fix it.

 

View solution in original post

Gwangjin
Here to help

Re: About Network usage

Thank you for your answer.

Then, should I understand that I can't get exactly the same value as Meraki Dashboard using API?

sungod
Getting noticed

Re: About Network usage

Well, you could get the same value, but to do that you would need to take your sample at the same time(s) that the Overview figures are calculated, I'd guess this is done daily. 

 

But unless you happen to take a sample at the same time, the API will always get a result that is equal or greater than shown in Overview due to usage since the daily sample.

 

This assumes all my guesses about how it works are close enough 😊

 

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.