Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

00 Bad Request, {'errors': ['Site-to-site VPN not enabled in your organization']} when trying to get VPN info from org without VPNs. #4

Open
TheHolm opened this issue Jun 1, 2024 · 2 comments

Comments

@TheHolm
Copy link
Owner

TheHolm commented Jun 1, 2024

2024-06-01 23:13:33       meraki:    ERROR > appliance, getOrganizationApplianceVpnStatuses - 400 Bad Request, {'errors': ['Site-to-site VPN not enabled in your organization']}
Exception in thread Thread-5 (get_vpn_statuses):
Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File /meraki-dashboard-promethus-exporter/meraki-api-exporter.py", line 25, in get_vpn_statuses
    vpnstatuses.extend(dashboard.appliance.getOrganizationApplianceVpnStatuses(organizationId=organizationId, total_pages="all"))
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/meraki-dashboard-promethus-exporter/venv/lib/python3.11/site-packages/meraki/api/appliance.py", line 2635, in getOrganizationApplianceVpnStatuses
    return self._session.get_pages(metadata, resource, params, total_pages, direction)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/meraki-dashboard-promethus-exporter/venv/lib/python3.11/site-packages/meraki/rest_session.py", line 401, in _get_pages_legacy
    response = self.request(metadata, 'GET', url, params=params)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/meraki-dashboard-promethus-exporter/venv/lib/python3.11/site-packages/meraki/rest_session.py", line 300, in request
    raise APIError(metadata, response)
meraki.exceptions.APIError: appliance, getOrganizationApplianceVpnStatuses - 400 Bad Request, {'errors': ['Site-to-site VPN not enabled in your organization']}

@brngates98
Copy link
Contributor

i can resolve this error in the exporter. wish this was commented on the main PR could of resolved then. i am looking at the ability to add some arguments to enable/disable certain metrics(like the vpn information)

@TheHolm
Copy link
Owner Author

TheHolm commented Jun 3, 2024

If you can create another pull request you are most welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants