Check Process by Pattern Match

Sometimes when a daemon really cannot create a PID file, the procmatch feature can be used to monitor a process. In order to do this, with the process running, first issue:

ps ax | grep <PATTERN>

where <PATTERN> is part of the name of the process you want to match and then issue:

monit procmatch <PATTERN>

where <PATTERN> is the same pattern you used before.

After that, a monit configuration file can be changed, from:

check process myprocess with pidfile /var/run/myprocess.pid

to:

check process myprocess matching "<PATTERN>"

in order to match a process by the <PATTERN> you used.


fuss/monit.txt ยท Last modified: 2017/02/22 18:30 (external edit)

Access website using Tor Access website using i2p


For the copyright, license, warranty and privacy terms for the usage of this website please see the license, privacy and plagiarism pages.