Werk #17884: Ruleset API: Fix NotificationParameter discovery

Component Checks & agents
Title Ruleset API: Fix NotificationParameter discovery
Date May 13, 2025
Level Trivial Change
Class Bug Fix
Compatibility Incompatible - Manual interaction might be required
Checkmk versions & editions
2.5.0b1
Not yet released
Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.4.0p4 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.3.0p34 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)

This change is relevant for plugin developers using cmk.rulesets.v1.rule_specs.NotificationParameters

The discovery of the NotificationParameters using the

rule_spec_<var_name> = NotificationParameters(...

syntax was previously broken and is with this werk now working as intended.

Note that in order to use the parameters the name has to match the name of the notifications script.

This discovery approach replaced the legacy approach

from cmk.gui.watolib.notification_parameter import notification_parameter_registry
notification_parameter_registry.register(NotificationParameterExample)

and

@notification_parameter_registry.register
class NotificationParameterExample(NotificationParameter):

which is no longer supported as of this Checkmk version.

To the list of all Werks