apsoto/monit — pull request #15 by xdissent (2012-10-27 02:22:38+00:00)
Title: Add monit chef handler

This PR adds a chef handler for monit that automatically unmonitors all services during a chef-client run, remonitoring them afterward. It was created to prevent monit from restarting, alerting, and just generally freaking out when chef manipulates service resources.

The handler has no effect if http isn't enabled in monitrc or localhost isn't allowed, since that's how the monit command line client communicates with the service. Install the handler by including the `monit::handler` recipe. Similarly to #14, there are a few assumptions regarding paths that may be platform-specific to Ubuntu.

Bonus: If a monit config for chef-client is found, the chef-client service is never unmonitored. That way, monit will still restart chef-client if it happens to bail mid-run.