Cmk -X, --config-check - Is there a way to execute this command via an API call?

I used this command quite often. Is there a way to execute this via an API call ?

cmk -X, --config-check Check configuration for invalid vars

Regards,
Sudhir Chauhan

Interesting option, do you modify your configuration files manually?
If i do the work with WATO or with API i had no invalid configuration the last 6-7 years.

There is no option inside the WATO API for this. You can only activate your changes - if this fails you get information and this would be normally not lead to a broken system.

Thank you Andreas. I was thinking of an automation to control the monitoring config. Atleast, the basic config files like contacts.mk, users.mk,roles.mk, hosttags.mk nd groups.mk from a standard linux host (which I will treat as a management server). The thing is I want to sync the above mentioned files or maybe more in future in all my monitoring instances. To test it , I will first implement the change in these .mk files to DIQ and then if all is well, then deploy the change to PROD. Before doing the change, I want to do a “cmk -X” so that if anyone has done any ckind of config changes, then the script won’t mess things up.

Or I think I should discuss this idea in another post.

I would don’t recommend this :wink:
Please use the WATO API to make such replicated setups. This is more save and can be modified over the time.
Since version 1.6 the mk files getting more and more complex and manual edit lead to unexpected behavior. This must not lead to a config error what you get with “cmk -X”.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.