Class: Bipbip::Plugin::Command

Inherits:
Bipbip::Plugin show all
Defined in:
lib/bipbip/plugin/command.rb

Instance Attribute Summary collapse

Attributes inherited from Bipbip::Plugin

#config, #metric_group, #name, #pid

Instance Method Summary collapse

Methods inherited from Bipbip::Plugin

factory, #frequency, #initialize, #interrupt, #interrupted?, #metrics_names, #run, #source_identifier

Methods included from InterruptibleSleep

#interrupt_sleep, #interruptible_sleep

Constructor Details

This class inherits a constructor from Bipbip::Plugin

Instance Attribute Details

#schemaObject

Returns the value of attribute schema.



8
9
10
# File 'lib/bipbip/plugin/command.rb', line 8

def schema
  @schema
end

Instance Method Details

#metrics_schemaObject



10
11
12
# File 'lib/bipbip/plugin/command.rb', line 10

def metrics_schema
  @schema ||= find_schema
end

#monitorObject



14
15
16
# File 'lib/bipbip/plugin/command.rb', line 14

def monitor
  Hash[command_output.map { |metric, value| [metric, metric_value(value)] }]
end