No commit activity in last 3 years
No release in over 3 years
Sensu monit plugins
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 0.10
~> 10.0
~> 3.2
~> 3.1
~> 0.40.0
~> 0.8

Runtime

= 2.6.3
 Project Readme

Sensu-Plugins-monit

Build Status Gem Version Code Climate Test Coverage Dependency Status

Functionality

Files

  • bin/check-monit-status.rb
  • bin/check-monit-email.rb

Usage

Installation

Installation and Setup

Notes

Monit plugin for sensu

Do you already have Monit running for your process monitoring and restarting but want to add sensu to your monitoring tool belt? Now you can have the best of both worlds and pipe in your Monit notifications in to sensu.

Notes

I currently use an array of "Events" that monit produce to figure out if the alert should be critical or resolved. Also monit does not seem to have a warning level so I left that out. You can learn more about monit events here

As with all open source projects this should be treated as alpha code and needs more TLC.

Requirements

You will need the mail gem to parse the monit email. We dont send any email but do receive it.

$ (sudo) gem install mail

Configuration

The setup is very different from other sensu plugins so RTFM.

  • Place monit-email.rb in a location that postfix can access it and execute it. Recommended location is /plugins/
  • Configure postfix to pipe messages from monit email address to monit-email.rb plugin
    • Create/Modify postfix transport at /etc/postfix/transport
      monit@domain.com       monit:
      
    • Create transport map db $ postmap /etc/postfix/transport
    • Add transport_map to main.cf
      transport_maps = hash:/etc/postfix/transport
      
    • Add the following to your master.cf
      #==========================================================================
      # service type  private unpriv  chroot  wakeup  maxproc command + args
      #               (yes)   (yes)   (yes)   (never) (100)
      #==========================================================================
      
      monit   unix    -       n       n       -       -       pipe
      user=sensu argv=/etc/sensu/plugins/monit-email.rb
      
    • Reload postifx $ sudo service postfix reload

License

Copyright 2012 Atlassian, Inc. and contributors.

Released under the same terms as Sensu (the MIT license); see LICENSE for details.