README.md in nagios_helper-0.1.2 vs README.md in nagios_helper-0.2
- old
+ new
@@ -1,44 +1,44 @@
NagiosHelper
============
Gem for writing, testing, executing Nagios checks inside Rails application.
-Checks running throught http or binary(nrpe).
+Checks running throught http or script.
```
-gem 'nagios_helper'
+gem 'nagios_helper', :require => 'nagios'
```
$ rails generate nagios:check some
-
-Check example:
+
+Check example:
--------------
app/nagios/some.rb
```ruby
class Nagios::Some < Nagios::Check
params :x
def execute
count = User.count + x.to_i
-
+
warn "hmmm" if count < 10
crit "ouch" if count < 5
-
+
ok "good #{count}"
end
end
```
-Run:
+Run:
$ RAILS_ENV=production bundle exec nagios_check some x 1
### Nagios Check Initilizers:
-All files in app/nagios/initializers will auto loads.
+All files in app/nagios/initializers will auto loads.
Server:
-------
### Inside rails server
@@ -56,15 +56,5 @@
end
```
$ curl http://nagios:password@localhost:3000/nagios/check?method=some&x=1
-
-### Outside rails server
-
-With using nonblocking EM-server [nagios_rails_server](http://github.com/kostya/nagios_rails_server)
-
-AR connections should be configured with pool: 100.
-
- $ RAILS_ENV=production bundle exec nagios_server
- $ curl localhost:9292/check/some?x=1
-