[Top][All Lists]

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

Re: monit unresponsive to status requests?

From: Randy Bias
Subject: Re: monit unresponsive to status requests?
Date: Mon, 25 Jul 2005 15:27:56 -0700

I like this hack, but the problem is that it adds in another process that I have to rely on. It's better if I am only relying on init and monit.


Randy Bias        randy-at-netenrich-dot-com
Director of Application Engineering & Support

On Jul 24, 2005, at 2:08 PM, Martin Pala wrote:

It is possible to use general 'trick' for this by using custom script running from cron for example, which updates the timestamp of some state file.

Monit then checks the timestamp of this file using the timestamp rule, for example:

  check file nfs_proc_count with path /tmp/nfs_state
    if timestamp > 10 minutes then ...

The script running from cron for example each 5 minutes, could be simple, something like:

  if [ `pgrep nfsd | wc -l` -ge 4 ]; then touch /tmp/nfs_state; fi

=> in the case that there are at least four nfs processes, timestamp of the /tmp/nfs_state file will be updated. In the case that there are less then four process, state file timestamp will not be updated and monit will trigger event.


Marco Ermini wrote:
This is what the OpenView sysadmin sometimes did. They have the agent
running an external script using, for instance, Korn shell. In this
script you can put anything, for instance, check that you have at
least 4 Java processes, or grep a log file, or whatever. Then the
result (0 as positive, other values as wrong) will trigger the alarm
or not.

To unsubscribe:

reply via email to

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