First thank you for providing us this very great monitoring tool, i like it very much!
I would like to suggest an improvement, or if what i suggest is already possible maybe it should be added more clearly to the documentation or added in the wiki.
We are monitoring several hosts from one host where Monit is installed. Problem is each time the router is down, alert is triggered for all external host. We would like to be able to manage those alert dependencies.
Here is an example:
check host internal-router with address 10.12.1.1 if failed ping then alert check host internet-box with address 192.168.20.254 depends on internal-router if failed ping then alert check host xenserver with address 188.8.131.52 depends on internet-box if failed ping then alert check host virtual-xen-machine with address 10.50.30.1 depends on xenserver if failed ping then alert
In this exemple, we want to check several host which are dependent.
In our office network:
- the host where Monit is installed
- internal-router: the router behing the internet box. The host with Monit is behind this router.
- internet-box: the internal-router is connected to this internet-box
Outside our office network:
- xenserver: the xenserver hypervisor to manage our VM (accesible from internet, on a different network)
- virtual-xen-machine: a VM managed by xenserver
Problem with this configuration is if internal-router is down, all 4 alerts are triggered. We wanted just to know the internal-server is down as in all case this is normal the other 3 hosts are not accessible as there is no more router : ) Or for instance if xenserver is down (the hypervisor) we don't want to receive alert for it's VM virtual-xen-machine being down (as the hypervisor is down this is the root cause of the problem).
I was able to make such dependencies with Zabbix monitoring tool, but with Monit it seems to be tricky. The keyword "depends on" don't work for our use case as it is only used when unmonitoring the host. A tricky way is explained here (http://blog.seljebu.no/2014/08/07/suppress-monit-alerts-upon-dependency/) but it will be a pain to configure for 4 dependencies and it lost the resolve alert.
Do i miss something in monit documentation (i read it in all ay and have been making multiple search on Google for this) ? It seems a classic problem. Is it an improvement i am asking or maybe just should the documentation explain this case ?
Thanks, Best regards.