Re: Monit : unmonitor during logrotate

Guillaume François <[email protected]>
Newsgroups gmane.comp.monitoring.monit.general
Message-ID <CALwv5CyPeQu12eiTGFEOmtbQritPnkcWGZRXQJjkh1xaa=vrLw@mail.gmail.com>
Hi,

Solution from Tino Hendricks is the recommended one I would say.

As alternative, you could also not check it, while it is restarted due to
rotation  (here down for rotation between 03:00 a.m. and 03:03 a.m) using
"not every syntax"

check process mysqld with pidfile /var/run/mysqld.pid
       not every "0-3 3 * * *"

or warn later on with the "for N cycles" syntax.

Best Regards.


2017-11-06 13:07 GMT+01:00 SZÉPE Viktor <[email protected]>:

> Idézem/Quoting Tino Hendricks <[email protected]>:
>
> Hi Gaston,
>>
>> how about using logrotate’s „prerotate“ and „postrotate" lines for
>> something like
>>
>>  prerotate
>>                 monit unmonitor blah
>>  endscript
>>
>>
>> https://linux.die.net/man/8/logrotate
>>
>> Best,
>>
>> Tino
>> Am 6. November 2017 um 11:29:38, tonthon ([email protected]) schrieb:
>>
>> Hi,
>>
>> Sometimes monit check services (and in my case restart them) while they
>> are rotating their logs.
>>
>> Do somebody faced the same problem ?
>>
>> Is there some good practice to avoid monitoring during logrotate ?
>>
>> Thanks in advance
>>
>> Regards
>>
>> Gaston Tjebbes
>>
>
>
> There is already one in the Debian package
> https://anonscm.debian.org/cgit/collab-maint/monit.git/tree/
> debian/monit.logrotate
>
>
>
> SZÉPE Viktor, honlap üzemeltetés
> https://github.com/szepeviktor/debian-server-tools/blob/master/CV.md
> --
> +36-20-4242498  [email protected]  skype: szepe.viktor
> Budapest, III. kerület
>
>
>
>
>
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general
>



-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/IT d(+) s++:- a C++$ ULC(+)>+++$ !P--- L+>$ !E---? W+++$ !N* !o-- K--?
w(+) !O---? !M- !V--? PS+? !PE Y+ PGP++>+++ !t-- !5 !X- R(+)>++* tv-? b(-)
DI !D- G(+)>+ e+++ h--() r->$ y?*
------END GEEK CODE BLOCK------

-- 
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.