Class: Oxidized::Exec
Constant Summary
Constants inherited
from Input
Input::RESCUE_FAIL
Instance Attribute Summary
Attributes included from Input::CLI
#node
Instance Method Summary
collapse
Methods included from Input::CLI
#connect_cli, #disconnect_cli, #get, #initialize, #login, #password, #post_login, #pre_logout, #username
#vars
Instance Method Details
#cmd(cmd_str) ⇒ Object
13
14
15
16
17
18
|
# File 'lib/oxidized/input/exec.rb', line 13
def cmd(cmd_str)
Oxidized.logger.debug "EXEC: #{cmd_str} @ #{@node.name}"
%x(#{cmd_str})
end
|
#connect(node) ⇒ Object
7
8
9
10
11
|
# File 'lib/oxidized/input/exec.rb', line 7
def connect(node)
@node = node
@log = File.open(Oxidized::Config::LOG + "/#{@node.ip}-exec", "w") if Oxidized.config.input.debug?
@node.model.cfg["exec"].each { |cb| instance_exec(&cb) }
end
|