HowTo: monit PROTOCOL & FAULT TOLERANCE

Started by Andreas.Wien, November 21, 2022, 09:19:54 PM

Previous topic - Next topic
November 21, 2022, 09:19:54 PM Last Edit: November 22, 2022, 01:22:50 AM by Andreas.Wien
I replaced my ISP-provided router with OPNsense 22.7.8 - and within one day this solution works like a charm, and the LAN issues are gone!
Really happy that added features like DHCP, AdGuard integration, intrusion detection, monitoring work out-of-the-box!

when I use monit to check all LAN devices are up I noticed that, by default, only the basic functionality of CHECK HOST ... PING is supported in the GUI.

I would also like to formulate a test like:
check host PING.128_i4 address 192.168.1.128
    if failed PORT 8091 PROTOCOL http request "/" then alert


and also have fault-tolerance implemented, for things like:
check host PING.220_NAS address 192.168.1.220
    if failed PORT 80
        3 TIMES WITHIN 5 CYCLES
    then alert


which infact works when edited directly in /usr/local/etc/monitrc - as long as the Service Settings in the GUI aren't touched, which writes a clean monitrc.

also thermal alerts would be nice to have!

[edit:] the above works with Service Test Settings / Condition: failed ping FOR 2 CYCLES  :)