Icinga notification dependency

Hi guys, one question about dependency.
I have several same Webserver (behind a Loadbalancer) with an application which use the same MySQL Database. If the MySQL DB fails, I get from each Webserver a notification that the Application fails. How can I change this that I get only one notification.
Thanks for help

The answer already is part of the question: With a dependency apply rule. :wink:

For more details see Object Types - Icinga 2 and Monitoring Basics - Icinga 2, but I will try to provide you an example.

apply Dependency "webapplication to database" to Service {
  parent_host_name = "database-server"
  parent_service_name = "mysql-service"

  states = [ OK, Warning ] // These are the states which are ok

  disable_checks = false // This is the default, change it to true to disable already the checks

  assign where match("webserver*",host.name) and service.name = "web-application" // some logic to match the service on all your webservers
}

Hi Dirk,
thanks for your quick answer. I will try your example :handshake:

Let us know if it worked for you by marking Dirks message as a solution if it helped you out :slight_smile: