[Top][All Lists]

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

Re: execute a command get results

From: EzCom Keith
Subject: Re: execute a command get results
Date: Sat, 18 Dec 2010 00:17:59 -0800

On Fri, Dec 17, 2010 at 9:46 PM, Bernd Wurst <address@hidden> wrote:

Am Freitag 17 Dezember 2010, 17:03:11 schrieb EzCom Keith:
> Without much more to go on, I would say this sounds like more of a shell
> script/cron
> situation, as Monit is only a monitor, and it isn't designed to interact
> directly with services
> in that manner. It just verifies that they live, and that certain file
> dependencies are
> unchanged.

It would be great if Monit would have such a feature, execute a script,
compare the exit-code or the output to a given value and set the monitoring
status based on that test.

So one could monitor arbitrary things that are too special to have monit a
built-in test for it.

I thought this has been on the agenda for Monit 5.0 some time ago. I hope this
will be available in future versions.


To unsubscribe:
Hi Bernd,
I just encountered a situation where I wanted a running PHP application monitored, and there's actually 2
different PHP scripts doing the work. One parses information, and the other displays that information
in a screen instance. The parsing script was already daemonized and running as a service. It was quite
easy to get Monit to start monitoring it. The other script, however, had me scratching my head on how
to get it as a service, and then how to get it into a screen.
I used the "wrapper" technique suggested at:
I had to do significant modifications, but the template provided gave me all the 'hints' I needed to get the
second scipt recognised as a service (with a pid file and lock file). I finally got the screen issue resolved
about an hour ago, and it is all working great! I have killed the service several times, and Monit has
restarted it flawlessly each time.
What I'm getting at here is, there are too many variables as to what each individual might want Monit to
request from so many different applications and/or services. To accomodate almost any scenario, Monit
would have to have a scripting language built into it, including Regular Expressions, the works. If the
devs take that approach, great... maybe even a plugin system of sorts? To me, it would be completely
unnecessary because there are so many already available scripting languages with which you can do
virtually anything you need done. By using the wrapper technique, your own scripts can then be monitored
by Monit, and that's what it's supposed to do.
I'm a VERY happy customer at the moment, due to the extremely small footprint that is Monit, and how
lightweight it is on system resources. It's barely there, and that, my friend, is its strongest suit. A lot
of us that use software get tired of all the bloatware that tries to do too much, and take over parts of your
OS you don't want it to. Monit is beautiful in its simplicity. Reminds me of when Nero used to be this little
burning ROM, versus what Nero is today.
- Keith

reply via email to

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