Hi,


First let me explain my goal:

I have a host, which has an array with lots of items. For each item I want 2 
service checks, and the second service check should depend on the first service 
check.


I have this weorking fine, except the dependency thing.



So what do I have:



apply Service "service_a " for (thing in host.vars.things) {
  import "generic-service"

  check_command = "check_a"
  check_interval = 10m
  retry_interval = 10m
  vars.thing = thing
  assign where host.vars.things != null
}
apply Service "service_b " for (domain in host.vars.things) {
  import "generic-service"

  check_command = "check_b"
  check_interval = 10m
  retry_interval = 10m
  vars.thing = thing
  assign where host.vars.things != null
}



So to add the dependency I figured I need to add something like the following:




apply Dependency "dep_a_b" for (thing in host.vars.things) to Service {
  parent_service_name = "service_a " + thing

  assign where service.check_command == "check_a"
}



This does not work however, because "thing" is not defined according to icinga



I hope anyone can help me out here :)



Regards,

Sander

_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to