- Director version (System - About): not installed
- Icinga Web 2 version and modules (System - About): Icinga Web 2.12.1, incubator 0.22.0, ipl 0.5.0, reactbundle 0.9.0
- Icinga 2 version (
icinga2 --version
): r2.14.2-1 - Operating System and version: Red Hat 7
- Webserver, PHP versions: Apache 2.4, PHP 7.3.33
I would like to run a service only if another service check returns “running”.
For example:
apply Service "illumio_noncritical" {
import "unix-remote-service"
check_command = "check_illumio_ven_ctl_connectivity"
assign where intersection(host.groups, [ "critical", "notcritical" ])
ignore where intersection(host.groups, [ "" ])
assign where intersection([host.name], [ "" ])
ignore where intersection([host.name], [ "" ])
vars.notification_interval = ""
vars.notification_period = "critical"
vars.contacts = [ "" ]
vars.contactgroups = [ "myusergroup" ]
vars.notification.mail.groups = [ "myusergroup" ]
groups = [ "mygroup" ]
}
And I have another service:
apply Service "pe-puppet_ci" {
import "unix-remote-service"
check_command = "check_base_puppet"
vars.notification_interval = ""
vars.notification_period = "critical"
vars.contacts = [ "me" ]
vars.contactgroups = [ "team-mailer" ]
vars.notification.mail.groups = [ "team-mailer" ]
groups = []
assign where intersection(host.groups, [ "ssnp_cimonitored" ])
ignore where intersection(host.groups, [ "ssnp_legacy_in_ci","ssnp_ci_no_puppet" ])
}
Is there a variable or method I could use to run illumio_noncritical only when pe-puppet_ci is returning “0”?