Class: Fluent::CloudwatchInput
- Inherits:
-
Input
- Object
- Input
- Fluent::CloudwatchInput
- Defined in:
- lib/fluent/plugin/in_cloudwatch.rb
Instance Method Summary collapse
- #configure(conf) ⇒ Object
-
#initialize ⇒ CloudwatchInput
constructor
A new instance of CloudwatchInput.
- #shutdown ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize ⇒ CloudwatchInput
Returns a new instance of CloudwatchInput.
20 21 22 23 |
# File 'lib/fluent/plugin/in_cloudwatch.rb', line 20 def initialize super require 'aws-sdk' end |
Instance Method Details
#configure(conf) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/fluent/plugin/in_cloudwatch.rb', line 25 def configure(conf) super AWS.config( :http_open_timeout => @open_timeout, :http_read_timeout => @read_timeout, ) @cw = AWS::CloudWatch.new( :access_key_id => @aws_key_id, :secret_access_key => @aws_sec_key, :cloud_watch_endpoint => @cw_endpoint, ).client end |
#shutdown ⇒ Object
45 46 47 48 49 |
# File 'lib/fluent/plugin/in_cloudwatch.rb', line 45 def shutdown super @watcher.terminate @watcher.join end |
#start ⇒ Object
40 41 42 43 |
# File 'lib/fluent/plugin/in_cloudwatch.rb', line 40 def start super @watcher = Thread.new(&method(:watch)) end |