NOTE: CONFIGURATION ON RUNNING THE INPUT PLUGIN FOR DYNAMODB LOOK AT THE BOTTOM
This is a plugin for Logstash.
It is fully free and fully open source. The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way.
Logstash provides infrastructure to automatically generate documentation for this plugin. We use the asciidoc format to write documentation so any comments in the source code will be first converted into asciidoc and then into html. All plugin documentation are placed under one central location.
- For formatting code or config example, you can use the asciidoc
[source,ruby]
directive - For more asciidoc formatting tips, see the excellent reference here https://github.com/elasticsearch/docs#asciidoc-guide
Need help? Try #logstash on freenode IRC or the logstash-users@googlegroups.com mailing list.
-
To get started, you'll need JRuby with the Bundler gem installed.
-
Create a new plugin or clone and existing from the GitHub logstash-plugins organization. We also provide example plugins.
-
Install dependencies
bundle install
- Update your dependencies
#####TODO: NOT DONE YET
bundle install
- Run tests
bundle exec rspec
TODO need to figure out the local plugin path. For now use 'gem build logstash-input-dynamodbstreams.gemspec' and add the absolute path of this the gem created to the Gemfile of the logstash app.
- Edit Logstash
Gemfile
and add the local plugin path, for example:
gem "logstash-filter-awesome", :path => "/your/local/logstash-filter-awesome"
- Install plugin
bin/plugin install --no-verify
- Run Logstash with your plugin
bin/logstash -e 'filter {awesome {}}'
At this point any modifications to the plugin code will be applied to this local Logstash setup. After modifying the plugin, simply rerun Logstash.
You can use the same 2.1 method to run your plugin in an installed Logstash by editing its Gemfile
and pointing the :path
to your local plugin development directory or you can build the gem and install it using:
- Install all dependencies of the gem
bundle install
- Build your plugin gem
gem build logstash-filter-awesome.gemspec
- Install the plugin from the Logstash home
bin/plugin install /your/local/plugin/logstash-filter-awesome.gem
- Start Logstash and proceed to test the plugin
All contributions are welcome: ideas, patches, documentation, bug reports, complaints, and even something you drew up on a napkin.
Programming is not a required skill. Whatever you've seen about open source and maintainers or community members saying "send patches or die" - you will not see that here.
It is more important to the community that you are able to contribute.
For more information about contributing, see the CONTRIBUTING file.
#Configuration for DynamoDB Logstash plugin
To run the DynamoDB Logstash plugin simply add a configuration following the below documentation.
An example configuration: input { dynamodb { table_name => "My_DynamoDB_Table" endpoint => "dynamodb.us-west-1.amazonaws.com" streams_endpoint => "streams.dynamodb.us-west-1.amazonaws.com" aws_access_key_id => "my aws access key" aws_secret_access_key => "my aws secret access key" perform_scan => true perform_stream => true read_ops => 100 number_of_write_threads => 8 number_of_scan_threads => 8 log_format => "plain" view_type => "new_and_old_images" } }
#Configuration Parameters
config :, , :required => , :default =>
config :table_name, :validate => :string, :required => true
old_image will return the entire entry before modification and keys (NOTE: Cannot perform scan when using this option)
config :view_type, :validate => ["keys_only", "new_image", "old_image", "new_and_old_images"], :required => true
config :endpoint, :validate => :string, :required => true
config :streams_endpoint, :validate => :string
config :aws_access_key_id, :validate => :string, :default => ""
config :aws_secret_access_key, :validate => :string, :default => ""
A flag to indicate whether or not the plugin should scan the entire table before streaming new records.
config :perform_scan, :validate => :boolean, :default => true
config :checkpointer, :validate => :string, :default => "logstash_input_dynamodb_cptr"
config :publish_metrics, :validate => :boolean, :default => false
config :perform_stream, :validate => :boolean, :default => true
config :read_ops, :validate => :number, :default => 1
config :number_of_scan_threads, :validate => :number, :default => 1
config :number_of_write_threads, :validate => :number, :default => 1
# For more information see: docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataFormat.html
json_drop_binary will return just the data specified in the view_format in JSON while not including any binary values that were present.
json_binary_as_text will return just the data specified in the view_format in JSON while including binary values as base64-encoded text.
config :log_format, :validate => ["plain", "dynamodb", "json_drop_binary", "json_binary_as_text"], :default => "plain"