lib/logstash/inputs/couchdb_changes.rb in logstash-input-couchdb_changes-0.1.1 vs lib/logstash/inputs/couchdb_changes.rb in logstash-input-couchdb_changes-0.1.2

- old
+ new

@@ -3,13 +3,22 @@ require "logstash/inputs/base" require "logstash/namespace" require "net/http" require "uri" -# Stream events from the CouchDB _changes URI. -# Use event metadata to allow for upsert and -# document deletion. +# This CouchDB input allows you to automatically stream events from the +# CouchDB http://guide.couchdb.org/draft/notifications.html[_changes] URI. +# Moreover, any "future" changes will automatically be streamed as well making it easy to synchronize +# your CouchDB data with any target destination +# +# ### Upsert and delete +# You can use event metadata to allow for document deletion. +# All non-delete operations are treated as upserts +# +# ### Starting at a Specific Sequence +# The CouchDB input stores the last sequence number value in location defined by `sequence_path`. +# You can use this fact to start or resume the stream at a particular sequence. class LogStash::Inputs::CouchDBChanges < LogStash::Inputs::Base config_name "couchdb_changes" # IP or hostname of your CouchDB instance config :host, :validate => :string, :default => "localhost" @@ -41,10 +50,10 @@ # CouchDB to ensure the connection is maintained. Changing this # setting is not recommended unless you know what you are doing. config :heartbeat, :validate => :number, :default => 1000 # File path where the last sequence number in the _changes - # stream is stored. If unset it will write to "$HOME/.couchdb_seq" + # stream is stored. If unset it will write to `$HOME/.couchdb_seq` config :sequence_path, :validate => :string # If unspecified, Logstash will attempt to read the last sequence number # from the `sequence_path` file. If that is empty or non-existent, it will # begin with 0 (the beginning).