Skip to content
This repository was archived by the owner on Dec 15, 2021. It is now read-only.
This repository was archived by the owner on Dec 15, 2021. It is now read-only.

log4j system initialization problem #26

@yomansk8

Description

@yomansk8

Hello, I have an issue when using this plugin to output data to ElasticSearch.

My Logstash conf is the following :

input {
  dynamodb {
    _type => "dev_organizations"
    endpoint => "http://dynamodb:8000"
    streams_endpoint => "http://dynamodb:8000"
    view_type => "new_and_old_images"
    aws_access_key_id => "MY_ACCESS_KEY"
    aws_secret_access_key => "MY_SECRET"
    table_name => "dev_organizations"
  }
  dynamodb {
    _type => "dev_automations"
    endpoint => "http://dynamodb:8000"
    streams_endpoint => "http://dynamodb:8000"
    view_type => "new_and_old_images"
    aws_access_key_id => "MY_ACCESS_KEY"
    aws_secret_access_key => "MY_SECRET"
    table_name => "dev_automations"
  }
  dynamodb {
    _type => "dev_bags"
    endpoint => "http://dynamodb:8000"
    streams_endpoint => "http://dynamodb:8000"
    view_type => "new_and_old_images"
    aws_access_key_id => "MY_ACCESS_KEY"
    aws_secret_access_key => "MY_SECRET"
    table_name => "dev_bags"
  }
  dynamodb {
    _type => "dev_billings"
    endpoint => "http://dynamodb:8000"
    streams_endpoint => "http://dynamodb:8000"
    view_type => "new_and_old_images"
    aws_access_key_id => "MY_ACCESS_KEY"
    aws_secret_access_key => "MY_SECRET"
    table_name => "dev_billings"
  }
  dynamodb {
    _type => "dev_boxes"
    endpoint => "http://dynamodb:8000"
    streams_endpoint => "http://dynamodb:8000"
    view_type => "new_and_old_images"
    aws_access_key_id => "MY_ACCESS_KEY"
    aws_secret_access_key => "MY_SECRET"
    table_name => "dev_boxes"
  }
  dynamodb {
    _type => "dev_collects"
    endpoint => "http://dynamodb:8000"
    streams_endpoint => "http://dynamodb:8000"
    view_type => "new_and_old_images"
    aws_access_key_id => "MY_ACCESS_KEY"
    aws_secret_access_key => "MY_SECRET"
    table_name => "dev_collects"
  }
  dynamodb {
    _type => "dev_items"
    endpoint => "http://dynamodb:8000"
    streams_endpoint => "http://dynamodb:8000"
    view_type => "new_and_old_images"
    aws_access_key_id => "MY_ACCESS_KEY"
    aws_secret_access_key => "MY_SECRET"
    table_name => "dev_items"
  }
  dynamodb {
    _type => "dev_locations"
    endpoint => "http://dynamodb:8000"
    streams_endpoint => "http://dynamodb:8000"
    view_type => "new_and_old_images"
    aws_access_key_id => "MY_ACCESS_KEY"
    aws_secret_access_key => "MY_SECRET"
    table_name => "dev_locations"
  }
  dynamodb {
    _type => "dev_notifications"
    endpoint => "http://dynamodb:8000"
    streams_endpoint => "http://dynamodb:8000"
    view_type => "new_and_old_images"
    aws_access_key_id => "MY_ACCESS_KEY"
    aws_secret_access_key => "MY_SECRET"
    table_name => "dev_notifications"
  }
  dynamodb {
    _type => "dev_organizations"
    endpoint => "http://dynamodb:8000"
    streams_endpoint => "http://dynamodb:8000"
    view_type => "new_and_old_images"
    aws_access_key_id => "MY_ACCESS_KEY"
    aws_secret_access_key => "MY_SECRET"
    table_name => "dev_organizations"
  }
  dynamodb {
    _type => "dev_packers"
    endpoint => "http://dynamodb:8000"
    streams_endpoint => "http://dynamodb:8000"
    view_type => "new_and_old_images"
    aws_access_key_id => "MY_ACCESS_KEY"
    aws_secret_access_key => "MY_SECRET"
    table_name => "dev_packers"
  }
  dynamodb {
    _type => "dev_parcels"
    endpoint => "http://dynamodb:8000"
    streams_endpoint => "http://dynamodb:8000"
    view_type => "new_and_old_images"
    aws_access_key_id => "MY_ACCESS_KEY"
    aws_secret_access_key => "MY_SECRET"
    table_name => "dev_parcels"
  }
  dynamodb {
    _type => "dev_settings"
    endpoint => "http://dynamodb:8000"
    streams_endpoint => "http://dynamodb:8000"
    view_type => "new_and_old_images"
    aws_access_key_id => "MY_ACCESS_KEY"
    aws_secret_access_key => "MY_SECRET"
    table_name => "dev_settings"
  }
  dynamodb {
    _type => "dev_templates"
    endpoint => "http://dynamodb:8000"
    streams_endpoint => "http://dynamodb:8000"
    view_type => "new_and_old_images"
    aws_access_key_id => "MY_ACCESS_KEY"
    aws_secret_access_key => "MY_SECRET"
    table_name => "dev_templates"
  }
  dynamodb {
    _type => "dev_transactions"
    endpoint => "http://dynamodb:8000"
    streams_endpoint => "http://dynamodb:8000"
    view_type => "new_and_old_images"
    aws_access_key_id => "MY_ACCESS_KEY"
    aws_secret_access_key => "MY_SECRET"
    table_name => "dev_transactions"
  }
  dynamodb {
    _type => "dev_users"
    endpoint => "http://dynamodb:8000"
    streams_endpoint => "http://dynamodb:8000"
    view_type => "new_and_old_images"
    aws_access_key_id => "MY_ACCESS_KEY"
    aws_secret_access_key => "MY_SECRET"
    table_name => "dev_users"
  }
}
filter {
  dynamodb {}
  mutate {
    remove_field => ["message", "host", "eventName", "keys"]
  }
}
output {
  elasticsearch {
    hosts => ["http://elasticsearch:9200"]
    index => "%{[_type]}"
    document_id => "%{[id]}"
  }
  stdout {}
}

When I run Logstash, I got the following output :

Settings: Default pipeline workers: 4
log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Pipeline main started

Now if I try to insert item in my table, Logstash dont do anything (Dont capture the streams ?)...
But if I restart Logstash, the initial scan actually found the changes in tables and output them to ElasticSearch.

Any idea on why I got this behaviour ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions