Conditional include of a service check


We have some service checks, which I’d like to run only on certain hosts.
Ideally I’d have a data field on the host - something like ‘check_connected_state’ and if it’s true, enable the service.
At the moment I just pass the check_connected_state through to a custom script, but that seems a little clunky (and I end up with an extra service I don’t really need).

Can I

  • include/exclude the service
  • enable/disable the service
  • override the result
    based on another data field?


If I understand correctly that should be fairly easy.

Create the datafield, add it to a host template and then create a service apply rule that applies the service where the field is set to true.

Very simple example

host template

host object

service apply

Thanks! I didn’t think of using service apply rules as I usually just apply sets by host template. Brilliant!