Yes, the url was still reachable, on the said port.

Thanks,
Brice.

On 03/01/2012 16:54, Lawrence, Wayne wrote:
Have you checked if the page you are requesting in your timeout command is actually available to monit as if it isnt that would maintain the timeout status.
Other than that you could add a timeout to your service start like this.
start program = "/etc/init.d/the-service start" with timeout 60 seconds
this will stop monit checking it within in this case 60 seconds of it starting up although you can vary that depending how long your service takes to start and become fully functional.
Cheers
Wayne


On 3 January 2012 15:29, Brice Laurencin <[email protected] <mailto:[email protected]>> wrote:

    Thanks Wayne!
    That was the thing.

    Still I find it strange having to tell monit to stop looking at my
    process so it reinitializes the process' state.

    But again, thanks a lot!
    Brice.


    On 03/01/2012 16:26, Lawrence, Wayne wrote:
    Not sure i am reading your mail correctly but if my understanding
    is right the only email you will recieve is on timeout. As
    regards the timeout status have you tried unmonitoring the
    service and then monitoring it again?
    regards
    Wayne

    On 3 January 2012 15:18, Brice Laurencin
    <[email protected] <mailto:[email protected]>> wrote:

        Hi,
        sorry to bother you guys with what seems to be such a stupid
        question...

        I have a monit check so defined:

        check process the-service with pidfile
        /var/run/the-service/the-service.pid
         alert [email protected] <mailto:[email protected]> only on { timeout }
         start program = "/etc/init.d/the-service start"
         stop program = "/etc/init.d/the-service stop"
         if failed port 42 protocol http and request
        "/manager/admin/count" with timeout 15 seconds then restart
         if 3 restarts within 5 cycles then alert

        So monit starts, launches the service, monitors it.
        Everything is fine.

        I then proceed to kill the service a few times (using Unix
        kill), after every monit cycle.
        I end up with this monit log:

        [CET Jan  3 15:11:22] error    : 'the-service' process is not
        running
        [...]
        [CET Jan  3 15:11:55] error    : 'the-service' service
        restarted 3 times within 3 cycles(s) - alert
        [CET Jan  3 15:11:56] error    : 'the-service' process is not
        running
        [CET Jan  3 15:11:56] info     : 'the-service' trying to restart
        [CET Jan  3 15:11:56] info     : 'the-service' start:
        /etc/init.d/the-service
        [CET Jan  3 15:12:07] error    : 'the-service' service
        restarted 4 times within 4 cycles(s) - alert
        [CET Jan  3 15:12:07] info     : 'the-service' process is
        running with pid 16488

        I then receive a lonely mail, wich is quite consistent with
        the configuration, since I didn't ask for reminders.

        What I can't get to understand is the process status, which
        stays as timeout:
        Process 'the-service'
         status                            Timeout
         monitoring status                 monitored
         [...]

        Even though the process is up and running.
        If I stop/start the service using monit stop/start, the
        process is still timeout. If I then kill the process, I have
        a monit log looking quite like the one above.

        But this time, no mail. Could still be consistent, since the
        process is timeout, but the process was working for a period
        of time, so this should be a new timeout, and monit seems to
        now it because it tells me it will alert.

        What do I have to do to bring the process back to running,
        from monit point of vue, so I can receive subsequent alerts?

        Thanks for your help!
        Brice.


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




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

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




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

Reply via email to