monit-general
[Top][All Lists]
Advanced

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

Re: Is monit deterministic?


From: Lutz Mader
Subject: Re: Is monit deterministic?
Date: Wed, 1 Mar 2023 23:12:28 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

Hello Leonard,
the "start/stop/restart program" statement is available for all service
checks.

See https://mmonit.com/monit/documentation/monit.html#Service-checks

The actions used by the defined service tests use the internal handled
actions like "alert" and "unmonitor", the script defined by "exec" or
the scripts defined by the "start/stop/restart program" statement, with
"start", "stop" and "restart".

See https://mmonit.com/monit/documentation/monit.html#ACTION

There is no default or build in action/command defined.

You can use something like this,
based on a "restart program" script:
> check system $HOST
>   restart program "/sbin/reboot"
>   if loadavg (15 min) > 4 then restart

Or based on a "exec" script:
> check system $HOST
>   if loadavg (15 min) > 4 then exec "/sbin/reboot"

A suggestion only,
Lutz


Am 28.02.23 um 04:44 schrieb Leonard Teng:
> Hi all,
> 
>         Wanted to inquire on the restart action for monit. From my
> understanding, the restart action is only done for services, but I was
> wondering if there is a similar restart action or even reboot for the
> system itself? So something like this:
> 
> check system $HOST
>   if loadavg (15 min) > 4 then restart/reboot
> 
> Currently I'm just using a script that does 'sudo reboot', but I was
> wondering if there was anything already built in instead that I could use.
> 
> Best Regards,
> Leonard
> 
> On Sat, Dec 24, 2022 at 12:01 AM Lutz Mader <lutz.mader@freenet.de> wrote:
> 
>> Hello again Leonard Teng,
>> I can not find an auto renewal for client certificates.
>>
>>> Are there currently any implementations/solutions for auto
>>> renewal of client certificates when they become invalid or expired?
>>
>> To renew an expired client certificate, you must create and add a new
>> key client and remove the old key client.
>> Some more information are available in the manual, see
>> https://mmonit.com/monit/documentation/monit.html#Client-certificates
>> and https://mmonit.com/monit/documentation/monit.html#SSL-settings
>>
>> Sorry, no solution/sugestion,
>> Lutz
>>
>>
> 




reply via email to

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