monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use pid other than pidfile or procmatch


From: Martin Pala
Subject: Re: How to use pid other than pidfile or procmatch
Date: Mon, 23 Mar 2015 15:50:15 +0100

Hi,

Monit process check doesn't support script for getting PID, you can use custom 
script with "check program" statement: 
http://mmonit.com/monit/documentation/monit.html#PROGRAM-STATUS-TESTING

Regards,
Martin


> On 20 Mar 2015, at 00:17, David Montgomery <address@hidden> wrote:
> 
> Hi,
> 
> I can get the pid from supervisor as follows:
> 
> echo `supervisorctl status git_service_server: | grep RUNNING | awk -F' ' 
> '{print $4}' | sed -e 's/,$//' | paste -sd' '`
> 
> I have been having issues with my procmatch.
> 
> So given that I dont have a pid file or dont want to use procmatch how do I 
> do something like this?
> 
> check process git_service
>     with pid "echo `supervisorctl status git_service_server: | grep RUNNING | 
> awk -F' ' '{print $4}' | sed -e 's/,$//' | paste -sd' '`"
>     start program = "/usr/local/bin/supervisorctl start git_service_server:"
>     stop program = "/usr/local/bin/supervisorctl stop git_service_server:"
> 
> Thanks
> 
> 
> 
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

[Prev in Thread] Current Thread [Next in Thread]