Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 1.29 KB

README.md

File metadata and controls

43 lines (28 loc) · 1.29 KB

Monit Rubygem

A Ruby interface for Monit.

Installation

Just like any other gem:

gem install monit

Usage

status = Monit::Status.new({ :host => "monit.myserver.com",
                             :auth => true,
                             :username => "foo",
                             :password => "bar" })
status.get              # => true
status.platform         # => <Monit::Platform:0x00000003673dd0 ... >
status.platform.cpu     # => 2
status.platform.memory  # => 4057712

# => start/stop/restart/monitor/unmonitor
status.services.each do |service|
  service.stop!
end

For more options see the API documentation

Compatibility and Build Status

Build Status Code Climate

The gem is only compatible with Ruby 1.8.7 and above, including JRuby 1.6+. For the build status, check Travis CI.

License and copyright

Copyright © 2010 - 2013 Matias Korhonen & contributors

Licensed under the MIT license, see the LICENSE file for details.