Allow rule based on check_command

We want to create a rule for all locally defined checks. Unfortunately it seems that there is no rule for grouping/labeling/whatever bases on the check_command (only the service-names).

So I would suggest to create a rule to assing a label to all services based on the check command (e.g.
“check_mk-local”)
(see also Assign Servicegroup based on check_command)

1 Like

Are those checks that you want to group somehow written by yourself or are standard checks among them? For self-written checks a solution might be to automatically decorate them with labels (from within the check plugin), like author:micha and then apply a rule for all services with that label.

This only works for self-written checks, though. For other checks you must – unfortunately – resort to the services’ descriptions.

Btw, it’s refreshing to see that this is the second time you have the exact same problem as I do. :smiley:

sorry for the late reply - was in holiday :slight_smile:

Partially these checks are written by me (but these are local checks and not check plugins). There is no way I am aware of to assign labels to local checks.

Goal is to group all local checks together. I would suggest to auto assign a tag with the check_command to all checks

I would ask the question, what is the goal you want to achieve?
If you want only a “local checks” inside a view then the service search is enough.

1 Like

No it’s not just for a view.
We have shared responsibilities. A bunch of (identifiable) services which a central person is responsible for. The admins of the several servers are allowed to add local checks but these are in the responsibility of them. These checks should not e.g. notify the central admins

So we want to assign the local services (and some explicit standard checks) to special contact groups, service groups, assign icons etc.

Actually we are able to identify the “central checks” and are only able to assign via a “not in others” rule. A possibility to explicitly query these services would decrease complexity a lot. Therefore I would suggest to either add the check-command as a selection parameter in the rule definitions or add the check-command as a lable/tag globally

Regards

Michael