Class: Hinoki
- Inherits:
-
Object
- Object
- Hinoki
- 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
-
#aggregates ⇒ Object
Returns the value of attribute aggregates.
-
#checks ⇒ Object
Returns the value of attribute checks.
-
#clients ⇒ Object
Returns the value of attribute clients.
-
#events ⇒ Object
Returns the value of attribute events.
-
#stashes ⇒ Object
Returns the value of attribute stashes.
Instance Method Summary collapse
-
#health(consumers = 1, messages = 1) ⇒ Object
Delivers information about Sensu and RabbitMQ performance.
-
#info ⇒ Object
Metadata about the Sensu installation.
-
#initialize ⇒ Hinoki
constructor
A new instance of Hinoki.
Constructor Details
#initialize ⇒ Hinoki
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
#aggregates ⇒ Object
Returns the value of attribute aggregates.
11 12 13 |
# File 'lib/hinoki/base.rb', line 11 def aggregates @aggregates end |
#checks ⇒ Object
Returns the value of attribute checks.
11 12 13 |
# File 'lib/hinoki/base.rb', line 11 def checks @checks end |
#clients ⇒ Object
Returns the value of attribute clients.
11 12 13 |
# File 'lib/hinoki/base.rb', line 11 def clients @clients end |
#events ⇒ Object
Returns the value of attribute events.
11 12 13 |
# File 'lib/hinoki/base.rb', line 11 def events @events end |
#stashes ⇒ Object
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, =1) return @conn.get("/health?consumers=#{consumers}&messages=#{}") end |
#info ⇒ Object
Metadata about the Sensu installation
28 29 30 |
# File 'lib/hinoki/base.rb', line 28 def info return @conn.get('/info') end |