Monit does not find process match when process string is too long
Hello,
When the process string is too long (which is typical for Java processes), monit does not find the process when searched for by a regex.
Example:
root:/etc/rc.d/rc2.d # ps -ef | grep java | grep Enterprise_Manager | grep -v grep dnsadm 24117498 1 2 10:42:41 pts/1 1:14 ./jre/bin/java -Xms512m -Xmx1024m -Djava.awt.headless=true -XX:MaxPermSize=256m -Dmail.mime.charset=UTF-8 -Dorg.owasp.esapi.resources=./config/esapi -Dsun.java2d.noddraw=true -Dorg.osgi.framework.bootdelegation=org.apache.xpath com.zerog.lax.LAX /usr/sap/ccms/apmintroscope/bin/../Introscope_Enterprise_Manager.lax /tmp/env.properties.24117498
root:/etc/rc.d/rc2.d # monit procmatch java List of processes matching pattern "java":
./jre/bin/java -Xms512m -Xmx1024m -Djava.awt.headless=true -XX:MaxPermSize=256m
Total matches: 1
root:/etc/rc.d/rc2.d # monit procmatch Enterprise_Manager List of processes matching pattern "Enterprise_Manager":
Total matches: 0
So it looks like the process string is cut off after a certain length.
PS. I like monit a lot. Very nice tool!
Comments (8)
-
repo owner -
Hi,
Thanks for your quick response. It looks like exactly the same issue than the one you reference indeed, though the version of monit that I am running is 5.15:
monit -V
This is Monit version 5.15 Copyright (C) 2001-2015 Tildeslash Ltd. All Rights Reserved.
It is running on AIX version 7100-03-05-1524
-
repo owner - changed status to resolved
Fix Issue
#309: AIX: The check process by pattern was limited to 80 characters.→ <<cset 893e7c072d0d>>
-
Thanks for resolving the problem so quickly!
-
Would it be possible to make an intermediary compiled binary available for download? I am not very familiar with compilers...
-
repo owner We have created a binary build based on development snapshot, you can get it here: https://mmonit.com/tmp/monit-5.16_alpha1-aix-ppc.tar.gz
-
Thank you very much for your swift and helpful response!
-
repo owner - removed version
Removing version: 5.15 (automated comment)
- Log in to comment
Which monit version it is? (monit -V)
The process pattern limit is 4kB since monit 5.12 (fix for issue
#150rose the limit from 1kB to 4kB)