Yogibaer75 / Check_MK-Things

From check plugins to website extensions
60 stars 19 forks source link

Dell PowerVault: SSL certificate verification errors with 2.3.0p13.cee #73

Closed mbunkus closed 2 months ago

mbunkus commented 2 months ago

Hey,

after upgrading CheckMK from 2.3.0p11.cee to 2.3.0p13.cee the Dell PowerVault plugin (version 3.3.1) starts failing with:

[special_dellpowervault] requests.exceptions.SSLError: HTTPSConnectionPool(host='10.199.93.51', port=443): Max retries exceeded with url: /api/show/controllers (Caused by SSLError(CertificateError("hostname '10.199.93.51' doesn't match either of 'exeter1.bs.linet-services.de', 'exeter1', 'exeter2.bs.linet-services.de', 'exeter2'")))

Unfortunately the plugin always uses the IP address to connect & doesn't allow for a way to override either the name used during verification or to turn off verification completely.

mbunkus commented 2 months ago

Others fail with

Max retries exceeded with url: /api/show/controllers (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1000)')))

I've looked at the special agent_dellpowervault. In it there are two places where requests.get() is called (via the s object). In the first call you've already added verify=False, but it is missing in the second call. Adding it in the second call fixes the issue for me.

Yogibaer75 commented 2 months ago

Should be fixed with 00fa39e - added also the flag for SSL verification to the special agent config.