CMK version: 2.4.0p8cee
OS version: RHEL 8
Error message: Rule is managed by Quick setup
Hi all,
we are currently testing a script which we use in checkmk 2.3 to Add / modify / delete some checkmk rules.
During the tests with checkmk 2.4.0p8 we noticed that we can’t change conditions.
For troubleshooting I have created a new rule Service Label rule in the UI:
"domainType": "rule",
"id": "5a523de7-a920-41d8-a78c-7fbfab9053a3",
"title": "",
"members": {},
"extensions": {
"ruleset": "service_label_rules",
"folder": "/",
"folder_index": 0,
"properties": {
"disabled": false
},
"value_raw": "{'testlabel': 'thomas'}",
"conditions": {
"host_tags": [],
"host_label_groups": [],
"service_label_groups": [],
"service_description": {
"match_on": [
"test"
],
"operator": "one_of"
}
}
}
When I change the condition and send the following payload to the API endpoint (/api/1.0/objects/rule/):
{"properties": {
"disabled": false
},
"value_raw": "{'testlabel': 'thomas'}",
"conditions": {
"host_tags": [],
"host_label_groups": [],
"service_label_groups": [],
"service_description": {
"match_on": [
"test1"
],
"operator": "one_of"
}
}
}
I’m getting the following error:
{
"title": "Rule is managed by Quick setup",
"status": 400,
"detail": "Conditions cannot be modified for rules managed by Quick setup."
}
Modifiying the value_raw, comment and description of the same rule with the API endpoint works fine, the error occurs only when the condition is changed.
I can reproduce this with Service Label rules and Service Level rules.
As a workaround, we can delete and create the rule with the REST API, but has someone an idea what this error message means and if there is a workaround available so that we can change the condition directly in one API call?
Best Regards
Thomas