monit plugin for moonshine
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


A plugin for Moonshine

Moonshine_Monit provides simple installation and configuration management for monit.


script/plugin install git://

Monit configuration files go in config/monit/*.erb

The name of the configuration files are important. They must match the host name of the server where you want them deployed.

For example, if you have servers,, then you can name your config files "prod.erb", "app1.erb", "db1.erb"

This would install "prod.erb" and "db1.erb" to and "prod.erb" and "app1.erb" to ""


Your moonshine config has a few options:

  :interval: 15  # the interval that monit checks things in seconds

This plugin has two ways to send notifications

A mailserver:

   :port: 25

Or Prowl:

    :api_key: 1123hj12j4hg12jh4gj12h4gj1h2g4

If you use prowl there's a helper method that you can use in your config.erb files:

<%= prowl("your message here", priority) %> -- where priority is one of -2,-1,0,1,2    

Example config file

Please note that this plugin helps you get monit running. You're on your own writing monit config files, but here's an example with the prowl helper mentioned above.

Check out their documentation here: Monit

set httpd port 2812 and
  use address
  allow 123.456.789.123

check host stg-app1 with address
  if failed port 80 with timeout 15 seconds then <%= prowl("http down on stg-app1") %>
  if failed port 443 with timeout 15 seconds then <%= prowl("https down on stg-app1") %>