[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: |
Tue, 23 Jun 2015 11:25:41 +0200 |
> On 22 Jun 2015, at 21:51, Marie Mcallister <address@hidden> wrote:
>
> Hi Martin,
>
> Thank you for the response. The proc match is successful:
> monit procmatch classification
>
> List of processes matching pattern "classification":
>
> ------------------------------------------
>
> /mnt1/build/seeing/build/bin/classification_node -c
> /mnt1/config/classificationconfig.json
>
> ------------------------------------------
>
> Total matches: 1
>
>
> Is it the way I am formatting the check? It does not seem to be taking the
> whole 'start' line into consideration.
>
> -Marie
The pattern based process check uses regular expression - the “procmatch” calls
exactly the same code to find the matching process. I’m not sure what exactly
you need - if partial pattern is not sufficient, you can either use full
command, or for example if you need to make sure the command starts with some
absolute path, you can do it using “^” character in the pattern:
check process xyz matching
“^/mnt1/build/seeing/build/bin/classification_node”
The “start (program)” may be different then the running process pattern - if
for example the start program is script, which daemonizes the started program
or adds some parameters/options, etc.
Regards,
Martin