Automated bulk import of rules?

In the case of rulesets, parameters vary greatly with the type of ruleset. (Ruleset active_checks:http has different parameters from a ruleset like active_checks:ssh, of course). There’s no full documentation on all the possible ruleset parameters, so you’ll need one existing example of each type of rule for reverse-engineering in order to craft a suitable API call.

In the meantime I found out how the rule id’s are generated. Method “create()” of class Rule uses “utils.gen_id”, which uses /proc/sys/kernel/random/uuid to generate the random id’s.

So in my case, I’ll probably choose the approach of generating the text content for rules.mk.

If someone in the forum has already implemented a bulk import of checkmk rules in real-life either by API or by generating rules.mk, I’d be glad, if you could share your experiences!

Kind regards,
Dirk.