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