[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Checking service with timeout and for 3 cycles
From: |
Marshal Newrock |
Subject: |
Re: Checking service with timeout and for 3 cycles |
Date: |
Mon, 5 Feb 2007 11:10:25 -0500 |
On Mon, 5 Feb 2007 17:02:21 +0100
"J. Félix Ontañón" <address@hidden> wrote:
> I would like to monitor a service port with 2min timeout and only
> restart the service when it fails 3 times in 5 cycles.
>
> It seems that the monitrc command below doesn't work...
>
> check process my_service with pidfile "mypidfile"
> start = "start_program"
> stop = "stop_program"
> if failed port 10000 with timeout 120 seconds for 3 times within 5
> cycles then restart
> alert address@hidden
>
> ... because executing:
>
> /etc/monit> monit -t monitrc
> /etc/monit/monitrc:391: Error: syntax error '3'
>
> I ensure that line 391 matchs the if statement.
What version of monit are you running? When I set up monit recently, I
wrote my configuration file according to the documentation, but still
got a syntax error. Upgrading from 4.8.1 to 4.8.2 fixed that, though.
--
Marshal Newrock, Ideal Solution LLC
http://www.idealso.com