Best practic service template


I have downloaded a check packet with 20 individual check commands. I am now thinking about the best way to implement something like this, because I don’t think I have implemented it optimally in my service design.

Previously, I created a separate service template for each command and built a service set from it.

How would you do this?

sounds good

you could create a generic-service which is inherited by all the services. so if there are any common custom fields that you want, you can add them faster and not individually. you can also change the execution time for all checks your default value.

there is currently an issue if you overwrite values in service sets used in host templates:
[Overridden vars differ from view and generated file / Host Override in Template does not work when using service sets · Issue #2424 · Icinga/icingaweb2-module-director · GitHub]

I would consider a service set as a collection of services that belong together. If these services in the should be added all together it seem ok to put it in a set, but it helps to have more information like check command names to get a better understanding of your environment.

1 Like

thank you very much for your answer. this is how i did it:

Command created → Fields created → Command cloned → Service templates created for each command and included in a service set. The access data are defined in the host template.

This worked very well and is nice and clear.

But now I have a command that is a bit more complex and I am not sure how best to implement it.

The command is ./check-command --parameter -definition (1-10)