Most of the monitrc examples I see are verbose, lots of repeated 5-10 line boilerplate checks. Is there any way to parametize this stuff?
I want something like:
ensure_rails 8080
ensure_php 8081
ensure_mysql 10000
Do-able with Monit?
Most of the monitrc examples I see are verbose, lots of repeated 5-10 line boilerplate checks. Is there any way to parametize this stuff?
I want something like:
ensure_rails 8080
ensure_php 8081
ensure_mysql 10000
Do-able with Monit?
monit is actually pretty basic, as soon as you get past the simple stuff, it starts to glare out.
So no templated checks like you mention. Though it looks like they have a commercial offering which could feed back into the gpl free one, but I fear not :-(
However I started a project on github to try and catch the 80% of requirements cases with a list of per service scripts, to save everyone rehashing boiler plate; https://github.com/tolland/monit-shared
The idea being to have a community repo of scripts that cover most basic installs of those services, it has something for httpd and mysql. However all those scripts are still very rough, so be prepared to do some work...
Also if you use chef, there is a community cookbook for monit that provides a monitrc object similar to how you describe, but I found that it was slightly broken for CentOS, hence starting the monit-shared repo.