Hi Martin,

This is our monitrc: 

# monitrc: Managed by puppet.
#
set daemon 5
set logfile syslog facility log_local3
set idfile /var/lib/monit/id
set statefile /var/lib/monit/state
set eventqueue
    basedir /var/lib/monit/events
    slots 100
set httpd port 2812 and
   use address localhost
   allow 0.0.0.0/0.0.0.0
   allow admin:monit

include /etc/monit/conf.d/*


———

Our service definition:

check process myservice with pidfile /var/run/myservice.pid
  start program = "/bin/bash -c 'export HOME=/root PATH=$PATH:/usr/local/bin; 
cd /root && test -f /etc/profile.d/proxy.sh && . /etc/profile.d/proxy.sh; 
/usr/bin/myservice 2>&1 | logger -p local3.info -t myservice'"
        as uid root
  stop program = "/bin/bash -c '/bin/kill $(</var/run/myservice.pid)'"
        as uid root

———

Our logs seem to have rotated so I’ll need to dig those up.

Thanks!


> On Dec 22, 2016, at 1:04 PM, Martin Pala <[email protected]> wrote:
> 
> Please send your monit configuration and log.
> 
> 
>> On 22 Dec 2016, at 21:46, Bach Nguyen <[email protected]> wrote:
>> 
>> Hi Martin,
>> 
>> I’m seeing monit restart each cycle, but at some point it unmonitored the 
>> process which therefore causes it to no longer attempt restart.
>> 
>> We do not have any "if X restarts within Y cycles then <action>” statements 
>> in our monit confs
>> 
>> Thanks,
>> Bach
>>> On Dec 22, 2016, at 12:43 PM, Martin Pala <[email protected]> wrote:
>>> 
>>> Hello,
>>> 
>>> by default monit doesn't limit the number of restarts.
>>> 
>>> The "if X restarts within Y cycles then <action>" statement is optional and 
>>> if omitted (default), monit will restart each cycle.
>>> 
>>> Best regards,
>>> Martin
>>> 
>>> 
>>>> On 22 Dec 2016, at 21:02, Bach Nguyen <[email protected]> wrote:
>>>> 
>>>> Hey all,
>>>> 
>>>> From the monit docs, I see there’s a way to limit the number of restarts. 
>>>> However, there’s no mention of default behavior of how many restarts monit 
>>>> allows before unmonitoring.
>>>> 
>>>> How do I configure monit to never unmonitor, and therefore continue to 
>>>> attempt to restart indefinitely?
>>>> 
>>>> Thanks,
>>>> Bach
>>>> --
>>>> 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