[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Monit and laptops

From: Lutz Mader
Subject: Re: Monit and laptops
Date: Wed, 7 Oct 2020 22:58:30 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

Hello David,
I use monit on a Macbook, this works well.

> It seems like Monit would do just fine with a config that said “ping this 
> address and if you have N failures in time T (or cycles), cycle the 
> interface”. My only concern is how it might handle situations when the laptop 
> sleeps or partially sleeps (or wakes up and doesn’t have wifi for a bit). I 
> don’t think I’d want it to be flapping things in those cases. 

But you are right, a wake-up or a switch to a other wlan is a problem.

I configure monitrc to use the Macbook hostname to bind to.

use address macbook.local

And monit monitor themselves, to bind to an interface after the wake-up.

check host Monit with address macbookpro.local
  start program "/usr/local/bin/monit reload"
  if failed port 2812 with protocol https username "guest" password "guest"
     and request "/_ping" with status >= 200
     with ssl options {verify: disable, selfsigned: allow}
     with timeout 30 seconds for 3 cycles then start
#  if failed port 2812 with timeout 30 seconds for 3 cycles then start
#     else if recovered then alert
  if 3 restarts within 10 cycles then unmonitor

With regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]