https://github.com/sensu-plugins/sensu-plugins-monit
Sensu Monit Plugins
https://github.com/sensu-plugins/sensu-plugins-monit
monit monitoring sensu-plugins
Last synced: 7 months ago
JSON representation
Sensu Monit Plugins
- Host: GitHub
- URL: https://github.com/sensu-plugins/sensu-plugins-monit
- Owner: sensu-plugins
- License: mit
- Created: 2015-02-11T07:04:40.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-04-29T19:17:36.000Z (about 4 years ago)
- Last Synced: 2024-11-08T21:05:06.733Z (8 months ago)
- Topics: monit, monitoring, sensu-plugins
- Language: Ruby
- Homepage: http://sensu-plugins.io
- Size: 40 KB
- Stars: 2
- Watchers: 11
- Forks: 5
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
## Sensu-Plugins-monit
[ ](https://travis-ci.org/sensu-plugins/sensu-plugins-monit)
[](http://badge.fury.io/rb/sensu-plugins-monit)
[](https://codeclimate.com/github/sensu-plugins/sensu-plugins-monit)
[](https://codeclimate.com/github/sensu-plugins/sensu-plugins-monit)
[](https://gemnasium.com/sensu-plugins/sensu-plugins-monit)## Functionality
## Files
* bin/check-monit-status.rb
* bin/check-monit-email.rb## Usage
## Installation
[Installation and Setup](http://sensu-plugins.io/docs/installation_instructions.html)
## 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](http://mmonit.com/monit/documentation/monit.html#alert_messages)
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
```
[email protected] 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 reloadLicense
-----------
Copyright 2012 Atlassian, Inc. and contributors.Released under the same terms as Sensu (the MIT license); see LICENSE for details.
[1]:[https://travis-ci.org/sensu-plugins/sensu-plugins-monit]
[2]:[http://badge.fury.io/rb/sensu-plugins-monit]
[3]:[https://codeclimate.com/github/sensu-plugins/sensu-plugins-monit]
[4]:[https://codeclimate.com/github/sensu-plugins/sensu-plugins-monit]
[5]:[https://gemnasium.com/sensu-plugins/sensu-plugins-monit]