Class: Fluentd::Agent::TdAgent
- Inherits:
-
Object
- Object
- Fluentd::Agent::TdAgent
show all
- Includes:
- Common, LocalCommon
- Defined in:
- app/models/fluentd/agent/td_agent.rb
Instance Attribute Summary
Attributes included from Common
#extra_options
Class Method Summary
collapse
Instance Method Summary
collapse
#config, #config_append, #config_write, #configuration, #log, #log_tail, #running?
Methods included from Common
#config_file, #errors_since, #initialize, #log_file, #pid_file, #recent_errors, #wait_process_starting_seconds
Class Method Details
.default_options ⇒ Object
7
8
9
10
11
12
13
|
# File 'app/models/fluentd/agent/td_agent.rb', line 7
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
|
Instance Method Details
#restart ⇒ Object
23
24
25
26
27
|
# File 'app/models/fluentd/agent/td_agent.rb', line 23
def restart
detached_command('/etc/init.d/td-agent restart')
end
|
#start ⇒ Object
15
16
17
|
# File 'app/models/fluentd/agent/td_agent.rb', line 15
def start
detached_command('/etc/init.d/td-agent start')
end
|
#stop ⇒ Object
19
20
21
|
# File 'app/models/fluentd/agent/td_agent.rb', line 19
def stop
detached_command('/etc/init.d/td-agent stop')
end
|
#version ⇒ Object
29
30
31
|
# File 'app/models/fluentd/agent/td_agent.rb', line 29
def version
`/usr/sbin/td-agent --version`.strip
end
|