Closed cristianoscarpa92 closed 3 years ago
Hey cristianoscarpa92 can you share your Meraki dashboard mac address so I can have a look? Additionally is this an appliance network or a combined network? Apologies for delay.
When looking at the organization I do see that all your networks are in combined networks and the network ID in the output you pasted above has L_ indicating other things. Let me make sure the code isnt only built to failover appliance networks. Will update once I have results.
Good news is I was able to replicate the issue, will have update and fix out later today.
2021-03-11 10:49:57 meraki: ERROR > networks, getNetworkEvents - 400 Bad Request, {'errors': ['productType is required']}
Traceback (most recent call last):
File "vwan-fail.py", line 14, in <module>
events_response = MerakiConfig.sdk_auth.networks.getNetworkEvents(
File "/usr/local/lib/python3.8/site-packages/meraki/api/networks.py", line 551, in getNetworkEvents
return self._session.get_pages(metadata, resource, params, total_pages, direction, event_log_end_time)
File "/usr/local/lib/python3.8/site-packages/meraki/rest_session.py", line 283, in get_pages
response = self.request(metadata, 'GET', url, params=params)
File "/usr/local/lib/python3.8/site-packages/meraki/rest_session.py", line 262, in request
raise APIError(metadata, response)
meraki.exceptions.APIError: networks, getNetworkEvents - 400 Bad Request, {'errors': ['productType is required']}
I am able to replicate the error when the network ID begins with L_. Easy fix/validation :) Again apologies for the delay
# retrieving third party vpn events for network that is detected as down
events_response = MerakiConfig.sdk_auth.networks.getNetworkEvents(
'xxxxxxxxxxxx', # inputting network ID but vpns['networkId'] is the value in the code
total_pages=1,
includedEventTypes = 'vpn',
productType= 'appliance' # here is the fix for the issue you are seeing :) Will add and repack this should take care of everything
)
print(events_response)
Fix is merged :) Can you try redeploying? @cristianoscarpa92
Now the are no errors on the script, but I have a new issue. Azure is configured with Appliance IP address instead of Shared IP. I did packet capture on Meraki switch port and the tunnel is initiated by Shared IP and not by MX IP.
As workaround I removed the use of virtual IP
Thanks for confirming :) I am going to close this issue out and opened this issue for what you reported: https://github.com/MitchellGulledge/Meraki-vWAN/issues/26
@cristianoscarpa92 confirmed the get network events error is no longer present and need to focus on #26 now
the script fail :
I try to manually request the same API by adding ?productType=appliance and I didn't receive error
The script also create object on Azure with secondary MX public ip