eNMS-automation / eNMS

An enterprise-grade vendor-agnostic network automation platform.
https://www.enms.io/
GNU General Public License v3.0
810 stars 160 forks source link

Topology import error ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1129) #405

Closed SaneiSaya closed 6 months ago

SaneiSaya commented 6 months ago

When trying to do an import from LibreNMS that has a self signed cert, the import fails with this error: ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1129)

Is there a way to disable the SSL verify?

afourmy commented 6 months ago

same problem as here: https://www.reddit.com/r/networking/comments/veqk23/trying_to_integrate_netbox_and_enms/

SaneiSaya commented 6 months ago

So we can edit the /eNMS/models/services/miscellaneous/topology_import.py and add the verify_ssl=False like this:

def query_librenms(self): devices = custom_http_get( f"{self.librenms_address}/api/v0/devices", headers={"X-Auth-Token": env.get_password(self.librenms_token)}, verify_ssl=False # Disable SSL verification ).json()["devices"]