Dependency on nrpe

Hello all,

we have a lot of servers on which nrpe check is applied. What I would like to accomplished is, that when nrpe daemon on some host is down, all nrpe check notifications are disabled, and only the one for checking nrpe state is alive. This should be done with dependencies, I guess.

Im trying to do something like below. For now Im trying only on one host - test.host.com. When it would work, I would like to apply this to all hosts that has nrpe check enabled.

apply Service "check_nrpe_alive" {
   import "generic-service"
   display_name = "NRPE live"
   check_command = "check_nrpe"
  assign where host.name == "test.host.com"
   command_endpoint = host.vars.client_endpoint
  }

apply Dependency "check-nrpe-alive" to Service {
  parent_service_name = "check_nrpe_alive"
  disable_notifications = true
  states = [ OK ]
  disable_checks = true
  assign where host.name == "test.host.com"
   ignore where service.name == "check_nrpe_alive" 
}

This don’t work. How could this be archived? In a nutshell - only notify errors from nrpe check, when nrpe is reachable on host side.

Thank you and kind regards,