[Top][All Lists]

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

Re: AW: counters?

From: Martin Pala
Subject: Re: AW: counters?
Date: Wed, 28 Jun 2006 16:00:36 +0200
User-agent: Thunderbird (Windows/20060516)


the syntax as described on the roadmap is not stone carved, but i think the idea was to recognize either pass or error.

The script should be responsible for returning the error code to monit - its output is not analyzed in monit, but just used as the error description (for example in alert message, logs, etc.)

Thus for example it can be used this way:

check_lpc script:
/usr/bin/lpc status | /usr/bin/awk '/disabled/ {print $0; exit 1}';

monit integration:
check status lpc with path "/path/to/check_lpc"
 if failed then alert


Andre Creutz wrote:
Hi Mike
Hi Martin

As example:

 CHECK STATUS OF printers WITH PATH "//usr/bin/lpc status"
  IF MATCH "disabled" THEN ALERT
May this is possible with the new feature?

Best regards

-----Urspr√ľngliche Nachricht-----
Von: address@hidden [mailto:address@hidden Im Auftrag von Martin Pala
Gesendet: Mittwoch, 28. Juni 2006 00:06
An: This is the general mailing list for monit
Betreff: Re: counters?

This feature is on the roadmap:


Mike wrote:
I've been reading the manual, not finished yet, and for
those obscure
situations where I need to check the value of something is
there a way
to execute a script, accept the script's return value (either stdout
or the return from (system()/255), then to use this value in a test
within monit?


possible example:

check counter widgets from "/opt/local/bin/"
  if widgets < 0 then alert
  if widgets > 1000 then alert

reply via email to

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