Class: Fluentd::Agent::FluentdGem
- Inherits:
-
Object
- Object
- Fluentd::Agent::FluentdGem
- Includes:
- Common, LocalCommon
- Defined in:
- app/models/fluentd/agent/fluentd_gem.rb
Instance Attribute Summary
Attributes included from Common
Class Method Summary collapse
Instance Method Summary collapse
-
#reload ⇒ Object
NOTE: does not used currently, and td-agent has no reload command.
-
#restart ⇒ Object
return value is status_after_this_method_called == started.
-
#start ⇒ Object
return value is status_after_this_method_called == started.
-
#stop ⇒ Object
return value is status_after_this_method_called == stopped.
- #version ⇒ Object
Methods included from LocalCommon
#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/fluentd_gem.rb', line 7 def self. { :pid_file => "#{ENV["HOME"]}/.fluentd-ui/fluent.pid", :log_file => "#{ENV["HOME"]}/.fluentd-ui/fluent.log", :config_file => "#{ENV["HOME"]}/.fluentd-ui/fluent.conf", } end |
Instance Method Details
#reload ⇒ Object
NOTE: does not used currently, and td-agent has no reload command
37 38 39 40 |
# File 'app/models/fluentd/agent/fluentd_gem.rb', line 37 def reload # NOTE: does not used currently, and td-agent has no reload command return false unless running? actual_reload end |
#restart ⇒ Object
return value is status_after_this_method_called == started
28 29 30 31 32 33 34 35 |
# File 'app/models/fluentd/agent/fluentd_gem.rb', line 28 def restart if running? && stop && start else # NOTE: no path to here from browser operations for now start end end |
#start ⇒ Object
return value is status_after_this_method_called == started
16 17 18 19 |
# File 'app/models/fluentd/agent/fluentd_gem.rb', line 16 def start return true if running? actual_start end |
#stop ⇒ Object
return value is status_after_this_method_called == stopped
22 23 24 25 |
# File 'app/models/fluentd/agent/fluentd_gem.rb', line 22 def stop return true unless running? actual_stop end |
#version ⇒ Object
42 43 44 45 46 |
# File 'app/models/fluentd/agent/fluentd_gem.rb', line 42 def version Bundler.with_clean_env do `fluentd --version`.strip end end |