Skip to content

thommay/hobelar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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))

(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.

About

Hobelar talks to reconnoiter's noit rest interface

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages