Assume I have an application with the following setup:
- 5 webservers running Apache
- 2 databases configured for failover
In Zabbix (or even another monitoring suite, for that matter), is it possible and how would I monitor "application status" and only alert when the following conditions are met:
- If 1 webserver stops responding, send an "info" alert
- If 3 webservers stop responding, send a warning
- If all webservers stop responding, send a critical
- If one DB is offline, send a warning
- If both DBs are offline, send a disaster
I know this looks like 5 questions, but the root question is: how do you create an alert that's abstracted away from a specific host? In every monitoring suite I've used, monitored items/alerts are bound to hosts, which leads to ugly workarounds like "check the database to see if all the servers checked in in the past 10 minutes," and if one hasn't, you get an alert email along the lines of "Host: database01.company.com - webserver05 hasn't checked in in 10 minutes". The email leads you to believe there's a problem with the database (since the check is tied to the database) but the problem is actually with the webserver. Ideally the alert would be tied to an abstract thing like "Corporate Application 1". Can this be done?