Replicating Nagios templates in CheckMK

Hi,

Im trying to replicate the Nagios service a host templates in checkmk. A template of service for example
could be CHECK_IC5_IR2_MIC3, this means that the service Interval Check will be each 5 minutes, the Retry Check every 2 minutes and the Max IC Attempts will be 3. This template is applied to lot of services.

How can I make a service rule or something similar to replicate this functionality in checkmk? Has anyone do something similar?
Thanks!!

If I understand correctly, you’re looking to leverage the rules of CheckMK but I don’t believe there’s 1 spot to set everything like you’re doing in Nagios. I’m also not familiar with the CLI/Config edits in Check_MK so there might be a way to do this from there but I’ll leave that to someone more familiar with it.

NOTE! I have inline help hidden but it explains the majority of the fields and the regex of the conditions for ‘Services’ as well. Access it with Help > Show inline help

For example for the retry on service you can use
Setup > Services > Service monitoring rules > Retry check interval for service checks

Try hitting setup and using the search there to find the other metrics as I believe there are rules for each one that will allow you to build rules to do exactly what you’re asking for. Also note the warnings with the rules about the effect on other settings (retry > normal interval in this case).

Sincerely,
Scotsie

Thank you for your time spent in replying! @scotsie

My question is more focused on how I can have a configuration that applies to many services, and changing that configuration affects all services. A way to group. Is there any way? I have tried with service labels, but there can only be one key defined in the rules.

Hi @alz0

The services (or hosts) a rule applies to is determined by the conditions. So if you don’t define any conditions, the rule is applied to all services / hosts. If you define a condition (i.e. a name, or a regex, or a tag, or a label, or a specific folder, or, or, or… ) it is applied to all those services or hosts where the condition matches.
Read more here: Rules

If you define a rule in the main directory, it is inherited by all folders below.
Read more here: Host structuring

Hope this helps.
Elias

Yes, sure it helps, thanks @elias.voelker

1 Like

@alz0 Ah, my approach was based on thinking you had a specific service or services you wanted to modify. This still works as @elias.voelker mentions globally if you leave off the service condition to the match.

Sincerely,
Scotsie

1 Like