The following line could account for what you are seeing:

if 5 restarts within 5 cycles then timeout

If this occurs, then the service will become unmonitored iirc.

The best thing you can do is look at your log files and see what they say.
 They will likely tell you more than anyone on this list can with the
current information we have.



On Tue, Dec 11, 2012 at 2:25 PM, Alexandre Vilarinho <
[email protected]> wrote:

> Hello all
>
> I´m using the following configuration to monitor SSH servisse
>
> # seção para o ssh
> check process ssh with pidfile /var/run/sshd.pid
>       start program = "/etc/init.d/ssh start"
>       stop program = "/etc/init.d/ssh stop"
>       if cpu > 30% for 10 cycles then alert
>       if cpu > 40% for 8 cycles then alert
>       if cpu > 50% for 4 cycles then restart
>       if mem > 25 MB for 6 cycles then alert
>       if mem > 50 MB for 4 cycles then alert
>       if mem > 75 MB for 2 cycles then restart
>       if totalmem > 80 MB for 6 cycles then alert
>       if totalmem > 100 MB for 4 cycles then restart
>       if failed host 0.0.0.0 port 2233 type tcp protocol ssh with timeout
> 5 seconds then restart
>       if 5 restarts within 5 cycles then timeout
>       if totalmem > 160.0 MB for 4 cycles then alert
>       if totalmem > 200.0 MB for 6 cycles then restart
>       if children > 100 then restart
>       if totalcpu > 35% for 10 cycles then alert
>       if totalcpu > 45% for 8 cycles then alert
>       if totalcpu > 65% for 4 cycles then restart
>
> After I restart monit there is no error messagens, but when I access monit
> webpage there is a message that ssh service is not being monitored.
>
> Is the configuration wrong?
>
> Atenciosamente
>
> Alexandre Vilarinho
> Gerente de Engenharia de Rede IP/TI
> Tel.: (55 11) 3017-4683
> Cel.: (55 11) 7757-8388
> Fax: (55 11) 3017-4464
> [email protected]
> www.neovia.com.br
> ----------------------------
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general
>



-- 
Michael Johnson - MJ
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to