Monit and booting

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Monit and booting

Paul van der Vlis
Hello,

I have a monit rule like this:
----
check process apache with pidfile /var/run/apache2/apache2.pid
  start program = "/etc/init.d/apache2 start"
  stop program  = "/etc/init.d/apache2 stop"
  if 4 restarts within 20 cycles then timeout
----

What I don't know good, is what is happening at a boot. I would prefer
it when a process starts the normal way, and not trough Monit. Is there
a way to start this check after some time?

With regards,
Paul van der Vlis



--
Paul van der Vlis Linux systeembeheer Groningen
https://www.vandervlis.nl/

Reply | Threaded
Open this post in threaded view
|

Re: Monit and booting

Szépe Viktor
Try

set daemon 115
   start delay 10

in monit rc

Idézem/Quoting Paul van der Vlis <[hidden email]>:

> Hello,
>
> I have a monit rule like this:
> ----
> check process apache with pidfile /var/run/apache2/apache2.pid
>   start program = "/etc/init.d/apache2 start"
>   stop program  = "/etc/init.d/apache2 stop"
>   if 4 restarts within 20 cycles then timeout
> ----
>
> What I don't know good, is what is happening at a boot. I would prefer
> it when a process starts the normal way, and not trough Monit. Is there
> a way to start this check after some time?
>
> With regards,
> Paul van der Vlis
>
>
>
> --
> Paul van der Vlis Linux systeembeheer Groningen
> https://www.vandervlis.nl/



SZÉPE Viktor, webes alkalmazás üzemeltetés / Running your application
https://github.com/szepeviktor/debian-server-tools/blob/master/CV.md
~~~
ügyelet/hotline: +36-20-4242498  [hidden email]  skype: szepe.viktor
Budapest, III. kerület






Reply | Threaded
Open this post in threaded view
|

Re: Monit and booting

Paul van der Vlis
Hi Viktor, and others,

Op 30-08-19 om 15:40 schreef SZÉPE Viktor:
> Try
>
> set daemon 115
>   start delay 10
>
> in monit rc

This is a setting for everything. Every time I want to test something, I
have to wait some seconds. I don't like that. Isn't it possible in the
check?  Something like:
-----
check process apache with pidfile /var/run/apache2/apache2.pid
  start delay 10
  start program = "/etc/init.d/apache2 start"
  stop program  = "/etc/init.d/apache2 stop"
  if 4 restarts within 20 cycles then timeout
-----

Or only have an delay at boot, and not at a restart later.

With regards,
Paul

> Idézem/Quoting Paul van der Vlis <[hidden email]>:
>
>> Hello,
>>
>> I have a monit rule like this:
>> ----
>> check process apache with pidfile /var/run/apache2/apache2.pid
>>   start program = "/etc/init.d/apache2 start"
>>   stop program  = "/etc/init.d/apache2 stop"
>>   if 4 restarts within 20 cycles then timeout
>> ----
>>
>> What I don't know good, is what is happening at a boot. I would prefer
>> it when a process starts the normal way, and not trough Monit. Is there
>> a way to start this check after some time?
>>
>> With regards,
>> Paul van der Vlis
>>
>>
>>
>> --
>> Paul van der Vlis Linux systeembeheer Groningen
>> https://www.vandervlis.nl/
>
>
>
> SZÉPE Viktor, webes alkalmazás üzemeltetés / Running your application
> https://github.com/szepeviktor/debian-server-tools/blob/master/CV.md
> ~~~
> ügyelet/hotline: +36-20-4242498  [hidden email]  skype: szepe.viktor
> Budapest, III. kerület
>
>
>
>
>
>



--
Paul van der Vlis Linux systeembeheer Groningen
https://www.vandervlis.nl/

Reply | Threaded
Open this post in threaded view
|

Re: Monit and booting

monit-general mailing list
This was addressed in version 5.26.


Update to 5.26 and remove the "start delay" line.  Note if you are on a recent version and your distro hasn't updated the official package you normally install from, just drop in the pre-compiled binary over the top of the old one.   This worked for me in my CentOS 7 environment but the standard disclaimer applies to test this for yourself locally.


From: monit-general <monit-general-bounces+djones=[hidden email]> on behalf of Paul van der Vlis <[hidden email]>
Sent: Saturday, August 31, 2019 4:01 PM
To: [hidden email] <[hidden email]>
Subject: Re: Monit and booting
 
Hi Viktor, and others,

Op 30-08-19 om 15:40 schreef SZÉPE Viktor:
> Try
>
> set daemon 115
>   start delay 10
>
> in monit rc

This is a setting for everything. Every time I want to test something, I
have to wait some seconds. I don't like that. Isn't it possible in the
check?  Something like:
-----
check process apache with pidfile /var/run/apache2/apache2.pid
  start delay 10
  start program = "/etc/init.d/apache2 start"
  stop program  = "/etc/init.d/apache2 stop"
  if 4 restarts within 20 cycles then timeout
-----

Or only have an delay at boot, and not at a restart later.

With regards,
Paul

> Idézem/Quoting Paul van der Vlis <[hidden email]>:
>
>> Hello,
>>
>> I have a monit rule like this:
>> ----
>> check process apache with pidfile /var/run/apache2/apache2.pid
>>   start program = "/etc/init.d/apache2 start"
>>   stop program  = "/etc/init.d/apache2 stop"
>>   if 4 restarts within 20 cycles then timeout
>> ----
>>
>> What I don't know good, is what is happening at a boot. I would prefer
>> it when a process starts the normal way, and not trough Monit. Is there
>> a way to start this check after some time?
>>
>> With regards,
>> Paul van der Vlis
>>
>>
>>
>> --
>> Paul van der Vlis Linux systeembeheer Groningen
>> https://www.vandervlis.nl/
>
>
>
> SZÉPE Viktor, webes alkalmazás üzemeltetés / Running your application
> https://github.com/szepeviktor/debian-server-tools/blob/master/CV.md
> ~~~
> ügyelet/hotline: +36-20-4242498  [hidden email]  skype: szepe.viktor
> Budapest, III. kerület
>
>
>
>
>
>



--
Paul van der Vlis Linux systeembeheer Groningen
https://www.vandervlis.nl/