monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Alan Christie
Subject: Check a process (specifically its memory consumption) only if it exists?
Date: Thu, 8 Nov 2018 14:21:51 +0000

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
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]