Is there an API method to enable or disable a specific service on a host in Checkmk?
I have checked through the API documentation but found no direct options. A forum mentioned that rules can be created via API, could this be a possible approach? Any suggestions?
You cant list or get rules you have on checkmk through its own REST API, then knowing which rule (ID) you want/need to change you can then modify it (enable/disable) the rule.
You have more detailed info on this on the API documentation @ host:port/site/check_mk/api/doc/#operation/cmk.gui.openapi.endpoints.rule.list_rules
I tested and created a rule for disabling Checkmk service inside the host cmkhost and activated the rule but unfortunately the rule is not reflected inside the GUI. .
If one of the answers helped you solve your question, please mark it as the solution. This way, you thank the person who helped you and also indicate that the question has been resolved. This, in turn, helps others who come across the same question.
@robin.gierse It was a just a test utilizing the REST API. The primary objective was to disable monitoring for specific custom application services configured within Checkmk. Later, I used the REST API functionality to schedule downtime for these services.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.