Module: Fluent::Plugin
- Defined in:
- lib/fluent/plugin/cloudwatch/ingest.rb,
lib/fluent/plugin/cloudwatch/ingest/version.rb,
lib/fluent/plugin/in_cloudwatch.rb
Defined Under Namespace
Classes: Cloudwatch
Instance Method Summary collapse
Instance Method Details
#configure(conf) ⇒ Object
37 38 39 |
# File 'lib/fluent/plugin/in_cloudwatch.rb', line 37 def configure(conf) super end |
#initialize ⇒ Object
33 34 35 |
# File 'lib/fluent/plugin/in_cloudwatch.rb', line 33 def initialize super end |
#shutdown ⇒ Object
62 63 64 65 |
# File 'lib/fluent/plugin/in_cloudwatch.rb', line 62 def shutdown @finished = true @thread.join end |
#start ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/fluent/plugin/in_cloudwatch.rb', line 41 def start # Get a handle to Cloudwatch = {} Aws.config[:region] = @region if @sts_enabled [:credentials] = Aws::AssumeRoleCredentials.new( role_arn: @sts_arn, role_session_name: @sts_session_name ) log.info("Working in region #{@region}") log.info("Using STS for authentication with source account ARN: #{@sts_arn}, session name: #{@sts_session_name}") else log.info('Using local instance IAM role for authentication') end @aws = Aws::CloudWatchLogs::Client.new() @finished = false @thread = Thread.new(&method(:run)) end |