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, #frequency, #metric_group, #name, #tags

Instance Method Summary collapse

Methods inherited from Bipbip::Plugin

factory, factory_from_plugin, #initialize, #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.



6
7
8
# File 'lib/bipbip/plugin/command.rb', line 6

def schema
  @schema
end

Instance Method Details

#metrics_schemaObject



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

def metrics_schema
  @schema ||= find_schema
end

#monitorObject



12
13
14
# File 'lib/bipbip/plugin/command.rb', line 12

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