|
From: | Eric Pailleau |
Subject: | Re: New feature |
Date: | Thu, 09 Sep 2010 17:34:49 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) Gecko/20100624 Mandriva/3.0.5-0.1mdv2009.1 (2009.1) Thunderbird/3.0.5 |
I forgot to add that using the monit web site allow any machine or user to use the script (change 127.0.0.1 to you real Ip address if needed). They simply need to be allowed in the http server config. Otherwise, the monit command line need to be launch as the user running the daemon, or with same UID as the configuration. It is very restrictive ... (even using 'sudo' can help ...) Regards. Le 09/09/2010 17:23, Eric Pailleau a écrit :
Create a simple script, after having installed 'links' (or any other terminal web browse) --8<------------------------------------------------ #!/bin/bash # my own command line monit wrapper (tune it to return something else is needed ...) (links -dump http://127.0.0.1:2812/$1 | grep Status | grep running) && exit 0 || exit 1 --8<------------------------------------------------ Suppose the script is call monitstatus, then $> monitstatus spread; echo $? 0 Regards Le 09/09/2010 16:54, Andrew Holt a écrit :Hi, I am considering adding a new feature to monit, to whit: monit status<service> e.g. monit status spread ; echo $? Would return running 0 Which would return a string, and, set an appropriate error code on exit ( e.g. 0 - OK, 1 - unknown etc) Unless there is a better way ? Thanks, Andrew ============================= Andrew Holt Email: address@hidden De Omnibus Dubitandum ============================= -- To unsubscribe: http://lists.nongnu.org/mailman/listinfo/monit-general
-- Salutations - Best regards - mit freundlichen Grüssen ----------------- address@hidden ------------------------------------ fr - Merci d'utiliser cette addresse pour le support ou question technique en - Please use this address for any support or technical question ----------------- https://support.numlog.fr -------------------------------- fr - Privilégier la gestion de ticket d'incident (Clients NUMLOG) en - Prefere our trouble ticket application (NUMLOG's customers)
[Prev in Thread] | Current Thread | [Next in Thread] |