Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Hobelar talks to reconnoiter's noit rest interface

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 hobelar.gemspec
README.rdoc

hobelar

Hobelar talks to Reconnoiter’s REST interface. The name comes from a variety of light cavalry, originally from Ireland, used for skirmishing and reconnaissance.

Getting Started

sudo gem install hobelar

Noit only supports https connections using a valid client certificate. The REST interface, by default, is on port 43191.

require 'rubygems'
require 'hobelar'
h = Hobelar.new("https://localhost:43191","client.crt","client.key")

Supported operations are #get_check, #set_check and #del_check. All operations take a UUID and an optional path. #set_check also takes a hash structure that contains the attributes and config for the check you wish to add.

require 'uuid'
uuid = UUID.new.generate
attributes = {:config => {:url => "http://test.example.com/", :code=>200},
 :module=>"http", 
 :target => "x.x.x.x" }
h.set_check(uuid, attributes)

If you specify an :inherit config key, it will use the value of that key for explicit config inheritance.

If you don't have a valid CA, you'll need to disable peer validation when instantiating Hobelar

h = Hobelar.new("https://localhost:43191","client.crt","client.key", no_peer: true))

Copyright

(The MIT License)

Copyright © 2011 Thom May

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Something went wrong with that request. Please try again.