0

I have a very simple use case where I want to disable my check_cert service when httpd service is down. This is my httpd service template:

apply Service "httpd" { import "generic-service" check_command = "check_httpd_service" command_endpoint = host.vars.client_endpoint assign where host.vars.client_endpoint && host.vars.myserver }

And this is the cert check service:

apply Service "check_cert" { import "generic-service" check_command = "check_ssl_certificate" command_endpoint = host.vars.client_endpoint assign where host.vars.client_endpoint && host.vars.myserver }

I tried this but still got an alert from the check_cert:

apply Dependency "cert_http_depend" to Service { parent_service_name = "httpd" disable_checks = true disable_notifications = true assign where host.vars.client_endpoint && host.vars.myserver }

What am I missing here?

0

You may need the state that the parent service should be:

parent_service_name = "httpd"
...
states = [ OK ]
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.