[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Monit: 'Matching' functionality isn't working
From: |
Martin Pala |
Subject: |
Re: Monit: 'Matching' functionality isn't working |
Date: |
Thu, 18 Jun 2015 11:56:53 +0200 |
Hello Marie,
you can test the pattern using CLI:
monit procmatch “<pattern>”
If you won’t find the pattern, please post output of the real process: “ps -ef
| grep <example_process>”, so we can test the match.
Regards,
Martin
> On 18 Jun 2015, at 04:38, Marie Mcallister <address@hidden> wrote:
>
> Hello,
>
> I have a process that's kicked off from a custom script. The process does not
> end with '.pid' so I am trying to use 'matching'. However it seems to be
> breaking on the whitespace (just stops after 'bin/bash'), no matter how I
> format the command. The commands themselves do work fine, outside of monit.
>
> Here is what I am trying to use:
>
> check process example_process matching "example_process"
> start program = "/bin/bash -c 'nohup /mnt1/path/to/custom/bin/run.sh &'"
> stop program = "/usr/bin/killall example_process"
> if cpu > 80% for 2 cycles then alert
> if cpu > 95% for 5 cycles then restart
> if totalmem > 500.0 MB for 5 cycles then restart
> if children > 3 then restart
>
> Errors logged:
>
> [UTC Jun 18 02:01:46] info : 'system_ip-10-0-11-189' Monit started
> [UTC Jun 18 02:01:46] error : 'example_process' process is not running
> [UTC Jun 18 02:01:46] info : 'example_process' trying to restart
> [UTC Jun 18 02:01:46] info : 'example_process' start: /bin/bash
> [UTC Jun 18 02:02:16] error : 'example_process' failed to start
> rinse, repeat...
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general