Hi. . . I’m trying to create a service dependency. We have an address validation web service which I check with a service check called AddrValidation
. It does this for two hosts so I get qa!AddrValidation
and uat!AddrValidation
which appear in the list of services. We have multiple environments which consume those services called UAT1-addrvalidation
, UAT2-addrvalidation
, etc. I’m trying to create a dependency so that the individual environment checks don’t run if the main service is down so I have this:
apply Dependency "addravail_calls-depon-addravail_svc" to
Service {
parent_service_name = "qa!AddrValidation"
states = [ OK ]
disable_checks = true
disable_notifications = true
assign where match("*-addrvalidation", service.name)
}
However, it can’t find the parent service, reporting:
[2019-07-10 09:19:35 -0700] critical/config: Error: Dependency 'scan-host.example.org!WIT2-addrvalidation!addravail_calls-depon-addravail_svc' references a parent host/service which doesn't exist.
Location: in /etc/icinga2/conf.d/dependencies.conf: 1:0-1:64
/etc/icinga2/conf.d/dependencies.conf(1): apply Dependency "addravail_calls-depon-addravail_svc" to Service {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/etc/icinga2/conf.d/dependencies.conf(2): parent_service_name = "qa!AddrValidation"
I’ve tried variants of the parent service name such as excluding the host portion (qa!
).
The service name I’m using appears in the object list command so I know it’s there. Is there something I’m missing?
Andy