|
From: | Martin Pala |
Subject: | Re: monit unresponsive to status requests? |
Date: | Sun, 24 Jul 2005 23:08:59 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Debian/1.7.8-1 |
Monit then checks the timestamp of this file using the timestamp rule, for example:
--8<-- check file nfs_proc_count with path /tmp/nfs_state if timestamp > 10 minutes then ... --8<--The script running from cron for example each 5 minutes, could be simple, something like:
--8<-- if [ `pgrep nfsd | wc -l` -ge 4 ]; then touch /tmp/nfs_state; fi --8<--=> 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.
Martin 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.
[Prev in Thread] | Current Thread | [Next in Thread] |