README.md in nagios_helper-0.1.1 vs README.md in nagios_helper-0.1.2
- old
+ new
@@ -1,9 +1,9 @@
NagiosHelper
============
-Rails gem for writing, testing, executing Nagios checks inside Rails application.
+Gem for writing, testing, executing Nagios checks inside Rails application.
Checks running throught http or binary(nrpe).
```
gem 'nagios_helper'
```
@@ -45,22 +45,20 @@
Create controller: app/controllers/nagios_controller.rb
```ruby
class NagiosController < ApplicationController
+ http_basic_authenticate_with :name => "nagios", :password => "password"
def check
status, message = Nagios::Runner.check(params)
-
- respond_to do |f|
- f.html{ status + "," + message }
- end
+ render :text => "#{status}|#{message}", :layout => false
end
end
```
- $ curl localhost:3000/nagios/check?method=some&x=1
+ $ 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)