logstash-plugins / logstash-integration-aws

Apache License 2.0
7 stars 17 forks source link

Unable to install cloudwatch_logs input plugin #42

Open charlesfused opened 7 months ago

charlesfused commented 7 months ago

Logstash 8.11.4

Attempting to install plugin with this command

logstash@758a332b26d4:~$ bin/logstash-plugin install logstash-input-cloudwatch_logs

Getting this error

Using bundled JDK: /usr/share/logstash/jdk
Validating logstash-input-cloudwatch_logs
Resolving mixin dependencies
WARN: Unresolved or ambiguous specs during Gem::Specification.reset:
      date (>= 0)
      Available/installed versions of this gem:
      - 3.3.4
      - 3.3.3
WARN: Clearing out unresolved specs. Try 'gem cleanup <gem>'
Please report a bug if this causes problems.
Installing logstash-input-cloudwatch_logs
Plugin version conflict, aborting
ERROR: Installation Aborted, message: Bundler could not find compatible versions for gem "aws-sdk-core":
  In Gemfile:
    logstash-input-cloudwatch_logs was resolved to 0.10.3, which depends on
      logstash-mixin-aws (>= 4.2.0) was resolved to 4.2.4, which depends on
        aws-sdk (~> 2.3.0) was resolved to 2.3.0, which depends on
          aws-sdk-resources (= 2.3.0) was resolved to 2.3.0, which depends on
            aws-sdk-core (= 2.3.0)

    logstash-integration-aws was resolved to 7.1.6, which depends on
      aws-sdk-core (~> 3)
Bundler could not find compatible versions for gem "logstash-core":
  In Gemfile:
    logstash-core-plugin-api was resolved to 2.1.16, which depends on
      logstash-core (= 8.11.4)

    logstash-input-cloudwatch_logs was resolved to 0.9.2, which depends on
      logstash-core (< 3.0.0, >= 1.4.0)

has anyone installed this successfully?

badbatcat commented 7 months ago

/usr/share/logstash/bin/logstash-plugin remove logstash-integration-aws /usr/share/logstash/bin/logstash-plugin install logstash-input-cloudwatch_logs

badbatcat commented 7 months ago

Unfortunatly cw requests authentication token : /usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:405:inblock in start_input' [ERROR] 2024-01-30 21:31:00.336 [[main]<cloudwatch_logs] javapipeline - A plugin had an unrecoverable error. Will restart this plugin. Pipeline_id:main Plugin: <LogStash::Inputs::CloudWatch_Logs access_key_id=>"A***4D", add_field=>{"component"=>"somecomponent-cleanup", "environment"=>"int", "clientId"=>"CliientID", "partition"=>"cw2li", "componentGroup"=>"lambda", "type"=>"generic"}, log_group=>["/aws/lambda/somecomponent-lambda"], secret_access_key=>, id=>"297906a85f9c6d74553fabfd6085974107c4fa40130025e6c625d241ebd05543", region=>"us-east-1", sincedb_path=>"/efs/logstash/somepath/sincedb/component-lambda", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_0259ab89-9e73-4a4f-bcb7-95a925942e97", enable_metric=>true, charset=>"UTF-8">, role_session_name=>"logstash", interval=>60, log_group_prefix=>false, start_position=>"beginning"> Error: Missing Authentication Token Exception: Aws::CloudWatchLogs::Errors::MissingAuthenticationTokenException Stack: /usr/share/logstash/vendor/bundle/jruby/3.1.0/gems/aws-sdk-core-2.11.632/lib/seahorse/client/plugins/raise_response_errors.rb:15:in call' /usr/share/logstash/vendor/bundle/jruby/3.1.0/gems/aws-sdk-core-2.11.632/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:20:incall'`