Getting specific custom_check

Hi,
Is there anyway to get via Livestatus or via API de content of a specific custom check? I want to update (well, delete and create) if there is a difference between 2 lists, but I have more than 1500 custom checks so I dont want to get that heavy list each time I do that query…

I dont find the way of getting a specific custom_check, anyone knows a solution for this?
Thanks!!

You mean something like http://$SERVER/$SITE/check_mk/api/doc/#operation/cmk.gui.plugins.openapi.endpoints.service.show_service?

Hi @robin.gierse
Something like this:
Working:
http://$server/$site/check_mk/api/1.0/domain-types/rule/collections/all?ruleset_name=custom_checks

Not Working (Whast I want):
http://$server/$site/check_mk/api/1.0/domain-types/rule/collections/all?ruleset_name=custom_checks&title=service_name_example

Well, according to the documentation, what you are trying to do is not possible.
But you get a list of rules, so you should be able to parse those for the rule IDs and iterate through those then.

Yes, currently I1m doing that, but, due to the more than 1500 custom checks I have it si a heavy query.

Thanks for you time @robin.gierse :slight_smile:

1 Like

imho checkmk does not know what service names a certain check produces, it could be many (let say you enable the NetApp integration or prometheus) and as such searching for rules based on that will be hard.

It might be possible to do “effective rules on host” (Don’t remember top of my head what its called) where you would add a service search to that query.

Perhaps you can explain what you want to achieve here, there might be another option?

We have thousands of rules as well, but they are always placed on certain folders together with host labels. So we can limit the data based the above.