Muhammad Mu'az
Muhammad Mu'az

Reputation: 368

logstash show unknown setting aws_access_key_id

I'm using Amazon Elasticsearch Service 2.3.4 and Logstash 2.3.0 .

My configuration

input {
jdbc {
    # Postgres jdbc connection string to our database, mydb
    jdbc_connection_string => "jdbc:mysql://awsmigration.XXXXXXXXX.ap-southeast-1.rds.amazonaws.com:3306/admin?zeroDateTimeBehavior=convertToNull"
    # The user we wish to execute our statement as
    jdbc_user => "dryrun"
    jdbc_password => "dryruntesting"
    # The path to our downloaded jdbc driver
    jdbc_driver_library => "/opt/logstash/drivers/mysql-connector-java-5.1.39/mysql-connector-java-5.1.39-bin.jar"
    # The name of the driver class for Postgresql
    jdbc_driver_class => "com.mysql.jdbc.Driver"
    # our query
    statement => "SELECT * from Receipt"

    jdbc_paging_enabled => true
    jdbc_page_size => 200
}
}
output {
elasticsearch {
    index => "slurp_receipt"
    document_type => "Receipt"
    document_id => "%{uid}"
    hosts => ["https://search-XXXXXXXXXXXX.ap-southeast-1.es.amazonaws.com:443"]
    aws_access_key_id => 'XXXXXXXXXXXXXXXXX'
    aws_secret_access_key => 'XXXXXXXXXXXXXXX'
}
}

I got this error :

Fri Aug 26 07:30:13 UTC 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Unknown setting 'aws_access_key_id' for elasticsearch {:level=>:error}
Unknown setting 'aws_secret_access_key' for elasticsearch {:level=>:error}
Pipeline aborted due to error {:exception=>#<LogStash::ConfigurationError: Something is wrong with your configuration.>, :backtrace=>["/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/config/mixin.rb:134:in `config_init'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/outputs/base.rb:63:in `initialize'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/output_delegator.rb:74:in `register'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/pipeline.rb:181:in `start_workers'", "org/jruby/RubyArray.java:1613:in `each'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/pipeline.rb:181:in `start_workers'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/pipeline.rb:136:in `run'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/agent.rb:473:in `start_pipeline'"], :level=>:error}

How to solve it ?

Upvotes: 0

Views: 638

Answers (2)

Fairy
Fairy

Reputation: 3780

Assuming you are using the amazon_es plugin your output should look like this:

output {
    amazon_es {
        index => "slurp_receipt"
        hosts => ["https://search-XXXXXXXXXXXX.ap-southeast-1.es.amazonaws.com:443"]
        aws_access_key_id => 'XXXXXXXXXXXXXXXXX'
        aws_secret_access_key => 'XXXXXXXXXXXXXXX'
    }
}

Upvotes: 2

baudsp
baudsp

Reputation: 4110

aws_access_key_id and aws_secret_access_key are not valid configuration options for the Logstash elasticsearch plugin.
cf documentation

Upvotes: 1

Related Questions