fluentd-ui/app/models/fluentd/agent/td_agent.rb
2014-05-23 15:16:49 +09:00

30 lines
673 B
Ruby

class Fluentd
class Agent
class TdAgent
include Common
def self.default_options
{
:pid_file => "/var/run/td-agent/td-agent.pid",
:log_file => "/var/log/td-agent/td-agent.log",
:config_file => "/etc/td-agent/td-agent.conf",
}
end
def start
system('/etc/init.d/td-agent start')
end
def stop
system('/etc/init.d/td-agent stop')
end
def restart
# NOTE: td-agent has no reload command
# https://github.com/treasure-data/td-agent/blob/master/debian/td-agent.init#L156
system('/etc/init.d/td-agent restart')
end
end
end
end