Check a process (specifically its memory consumption) only if it exists?

Alan Christie <[email protected]>
Newsgroups gmane.comp.monitoring.monit.general
Message-ID <[email protected]>
Hi,

I have a process that runs on one of my hosts. I do not know in advance which host it will run on and the process can move to another host. What I would like to do is apply a check that checks the memory consumed by the process and issue an alert if it exceeds a predefined value. If the process does not exist then do nothing. Something like...

check process blob matching “blob-process”
  	if exists and memory > 50% then alert

Can this sort of logic be executed by monit or does it expect all processes to exist?

I could provide a shell-script or python module that implements the test returning pass/fail and simply call that from monit, but I wondered whether I could do this without having to bury the login in an external script.
 
Alan Christie
[email protected]

-- 
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.