amonapp / amon

Amon is a modern server monitoring platform.
https://docs.amon.cx
GNU Affero General Public License v3.0
1.33k stars 108 forks source link

Feature request: Parent/Master check #208

Open DerDanilo opened 6 years ago

DerDanilo commented 6 years ago

Currently one receives several alerts for checks on a node even if (by logic) the other service are not reachable if the host itself is not reachable. It should be possible to define a parent/master check, that if this one goes "down" does not trigger alerts for related other checks that cannot be checked by logic.

Example:

4 Alerts triggered

"/usr/lib/nagios/plugins/check_host host.mydomain.com",
"/usr/lib/nagios/plugins/check_ssh -p 1750 host.mydomain.com",
"/usr/lib/nagios/plugins/check_ftp host.mydomain.com -H host.mydomain.com -p 21 -w 5 -c 8 -t 10",
"/usr/lib/nagios/plugins/check_imap host.mydomain.com -H host.mydomain.com -p 993 -S -w 5 -c 8 -t 10",

The solution could be to have the parent/master check for a block defined in the JSON config files. Just move the children checks right below the master check. Maybe require an empty line after such a block if more parent <--> children checks are to be set for other things within the same file.

1 Alert triggered

"/usr/lib/nagios/plugins/check_host host.mydomain.com",
    "/usr/lib/nagios/plugins/check_ssh -p 1750 host.mydomain.com",
    "/usr/lib/nagios/plugins/check_ftp host.mydomain.com -H host.mydomain.com -p 21 -w 5 -c 8 -t 10",
    "/usr/lib/nagios/plugins/check_imap host.mydomain.com -H host.mydomain.com -p 993 -S -w 5 -c 8 -t 10",