Monit does not find process match when process string is too long

Issue #309 resolved
Former user created an issue

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)

  1. Tildeslash repo owner

    Which monit version it is? (monit -V)

    The process pattern limit is 4kB since monit 5.12 (fix for issue #150 rose the limit from 1kB to 4kB)

  2. Serge

    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

  3. Serge

    Would it be possible to make an intermediary compiled binary available for download? I am not very familiar with compilers...

  4. Log in to comment