Class: Hinoki

Inherits:
Object
  • Object
show all
Defined in:
lib/hinoki/version.rb,
lib/hinoki/base.rb,
lib/hinoki/checks.rb,
lib/hinoki/config.rb,
lib/hinoki/events.rb,
lib/hinoki/clients.rb,
lib/hinoki/stashes.rb,
lib/hinoki/aggregates.rb,
lib/hinoki/connection.rb

Overview

hinoki/version.rb

Defined Under Namespace

Modules: Aggregates, Checks, Clients, Events, Stashes Classes: Config, Connection

Constant Summary collapse

VERSION =
'1.0.0'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeHinoki

Returns a new instance of Hinoki.



13
14
15
16
17
18
19
20
# File 'lib/hinoki/base.rb', line 13

def initialize
  @conn       = Hinoki::Connection.new
  @aggregates = Hinoki::Aggregates
  @checks     = Hinoki::Checks
  @clients    = Hinoki::Clients
  @events     = Hinoki::Events
  @stashes    = Hinoki::Stashes
end

Instance Attribute Details

#aggregatesObject

Returns the value of attribute aggregates.



11
12
13
# File 'lib/hinoki/base.rb', line 11

def aggregates
  @aggregates
end

#checksObject

Returns the value of attribute checks.



11
12
13
# File 'lib/hinoki/base.rb', line 11

def checks
  @checks
end

#clientsObject

Returns the value of attribute clients.



11
12
13
# File 'lib/hinoki/base.rb', line 11

def clients
  @clients
end

#eventsObject

Returns the value of attribute events.



11
12
13
# File 'lib/hinoki/base.rb', line 11

def events
  @events
end

#stashesObject

Returns the value of attribute stashes.



11
12
13
# File 'lib/hinoki/base.rb', line 11

def stashes
  @stashes
end

Instance Method Details

#health(consumers = 1, messages = 1) ⇒ Object

Delivers information about Sensu and RabbitMQ performance



23
24
25
# File 'lib/hinoki/base.rb', line 23

def health(consumers=1, messages=1)
  return @conn.get("/health?consumers=#{consumers}&messages=#{messages}")
end

#infoObject

Metadata about the Sensu installation



28
29
30
# File 'lib/hinoki/base.rb', line 28

def info
  return @conn.get('/info')
end