Werk #17737: cmk-migrate-http: Add conflict options for certificate validation

Component Site management
Title cmk-migrate-http: Add conflict options for certificate validation
Date Apr 28, 2025
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.5.0b1
Not yet released
Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.4.0 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)

The script cmk-migrate-http can be used to migrate check_http rules to check_httpv2 rules in an automated fashion.

The old plug-in check_http allowed configuring SSL, but it would not check the validity of the certificate. Moreover, the plug-in always used the host address as the host name unless overwritten via Virtual host. If the certificate is validated, this configuration will cause certificate errors.

This change aims to remedy this problem and makes the following changes.

  • The migration script will use $HOSTADDRESS$ in place of the $HOSTNAME$ in the URL, which will fend off certificate errors due to the wrong hostname. A prerequisite to benefit from this change is that the corresponding host configurations contain the correct host name.
  • A new option --v2-checks-certificates is introduced. This option allows disabling certificate validation during migration. This affects rules using the Check the URL mode.
  • A new option --cant-ignore-certificate-validation is introduced. This option allows skipping migration of rules using the Check SSL Certificate Age mode.

To the list of all Werks