Issue with Meraki MX Tunnel Stats granularity

Solved
abondar
New here

Issue with Meraki MX Tunnel Stats granularity

Hi.

I'm building a service that must periodically (once a minute) pull stats of Site-To-Site VPN.

I call the "Get Organization Appliance Vpn Stats" API method with the query parameter "timespan=60" every minute to achieve this. My organization contains numerous Site-To-Site VPNs, and I get the same result on every one of them.

The issue I face is that API returns correct values (i.e. .usageSummary.receivedInKilobytes) during the first 10 minutes of polling, and then the next 10 minutes it returns zeros. This cycle repeats every 20 minutes, first 10 minutes I obtain correct values, following 10 minutes zeros.

 

I wrote a simple shell script to debug the issue. It does the same thing as my service: polls the API every minute.

while true; do echo -n `date +"[%H:%M:%S]\t"`; \
curl -s -H "Accept: application/json" -H "Authorization: Bearer ${API_TOKEN}" \
"https://api.meraki.com/api/v1/organizations/${ORG_ID}/appliance/vpn/stats?timespan=60" \
| jq -r -e '.[] | select(.networkId=="${NET1}").merakiVpnPeers[] \
| select(.networkId=="${NET2}").usageSummary.receivedInKilobytes'; sleep 60; done

 

The results are below:

[10:10:35] 7
[10:11:35] 7

[10:12:36] 7
[10:13:37] 7
[10:14:38] 7
[10:15:39] 7
[10:16:40] 7
[10:17:41] 7
[10:18:42] 7
[10:19:43] 7
[10:20:44] 0
[10:21:44] 0
[10:22:45] 0
[10:23:46] 0
[10:24:47] 0
[10:25:48] 0
[10:26:49] 0
[10:27:50] 0
[10:28:51] 0
[10:29:52] 0
[10:30:53] 51
[10:31:54] 51
[10:32:55] 51
[10:33:56] 51
[10:34:57] 51
[10:35:59] 51
[10:37:00] 51
[10:38:01] 51
[10:39:02] 51
[10:40:03] 0
[10:41:03] 0
[10:42:04] 0
[10:43:05] 0
[10:44:06] 0
[10:45:08] 0
[10:46:10] 0
... and so on

 

I've tried to find if any configuration affects this behavior but found nothing.

I wonder if this is a known issue. Is there a workaround?

 

Thanks,

Alex

1 Accepted Solution
PhilipDAth
Kind of a big deal
Kind of a big deal

That sounds like a bug.  It is going to require a support case.

View solution in original post

4 Replies 4
PhilipDAth
Kind of a big deal
Kind of a big deal

Any chance the traffic going over the VPN is simply cyclic?

Hi Philip. No, we see the traffic in Meraki dashboard with no gaps.

There is another piece of information. I've played around with the "timespan" parameter and experimentally found that if it is set to at least 30 minutes (timespan=1800), the API always returns some values. So, I ran my script in two sessions in parallel, first with timespan=60 and second with timespan=1800. As expected, the second session always had values, while the first session had 10-minute gaps. Also, when the first session (1min interval) had values, they were roughly equal to values from the second session (30 min interval) divided by 30.

PhilipDAth
Kind of a big deal
Kind of a big deal

That sounds like a bug.  It is going to require a support case.

John-K
Meraki Employee
Meraki Employee

There's a chance the minimum timespan is not documented or enforced. A 30-minute minimum timespan seems reasonable for some aggregate stats. But yes, a support case would be needed to nail it down.

Get notified when there are additional replies to this discussion.