riak

Milestone: 1

This is a community-contributed plugin! It does not ship with logstash by default, but it is easy to install! To use this, you must have installed the contrib plugins package.

Riak is a distributed k/v store from Basho. It’s based on the Dynamo model.

Synopsis

This is what it might look like in your config file:
output {
  riak {
    bucket => ... # array (optional), default: ["logstash-%{+YYYY.MM.dd}"]
    bucket_props => ... # hash (optional)
    codec => ... # codec (optional), default: "plain"
    enable_search => ... # boolean (optional), default: false
    enable_ssl => ... # boolean (optional), default: false
    indices => ... # array (optional)
    key_name => ... # string (optional)
    nodes => ... # hash (optional), default: {"localhost"=>"8098"}
    proto => ... # string, one of ["http", "pb"] (optional), default: "http"
    ssl_opts => ... # hash (optional)
    workers => ... # number (optional), default: 1
  }
}

Details

bucket

  • Value type is array
  • Default value is ["logstash-%{+YYYY.MM.dd}"]

The bucket name to write events to Expansion is supported here as values are passed through event.sprintf Multiple buckets can be specified here but any bucket-specific settings defined apply to ALL the buckets.

bucket_props

  • Value type is hash
  • There is no default value for this setting.

Bucket properties (NYI) Logstash hash of properties for the bucket i.e. bucket_props => ["r", "one", "w", "one", "dw", "one"] or bucket_props => ["n_val", "3"] Note that the Logstash config language cannot support hash or array values Properties will be passed as-is

codec

  • Value type is codec
  • Default value is "plain"

The codec used for output data. Output codecs are a convenient method for encoding your data before it leaves the output, without needing a separate filter in your Logstash pipeline.

enable_search

  • Value type is boolean
  • Default value is false

Search Enable search on the bucket defined above

enable_ssl

  • Value type is boolean
  • Default value is false

SSL Enable SSL

exclude_tags DEPRECATED

  • DEPRECATED WARNING: This config item is deprecated. It may be removed in a further version.
  • Value type is array
  • Default value is []

Only handle events without any of these tags. Note this check is additional to type and tags.

indices

  • Value type is array
  • There is no default value for this setting.

Indices Array of fields to add 2i on e.g. `indices => [“source_host”, “type”] Off by default as not everyone runs eleveldb

key_name

  • Value type is string
  • There is no default value for this setting.

The event key name variables are valid here.

Choose this carefully. Best to let riak decide….

nodes

  • Value type is hash
  • Default value is {"localhost"=>"8098"}

The nodes of your Riak cluster This can be a single host or a Logstash hash of node/port pairs e.g [“node1”, “8098”, “node2”, “8098”]

proto

  • Value can be any of: "http", "pb"
  • Default value is "http"

The protocol to use HTTP or ProtoBuf Applies to ALL backends listed above No mix and match

ssl_opts

  • Value type is hash
  • There is no default value for this setting.

SSL Options Options for SSL connections Only applied if SSL is enabled Logstash hash that maps to the riak-client options here: https://github.com/basho/riak-ruby-client/wiki/Connecting-to-Riak You’ll likely want something like this: ssl_opts => ["pem", "/etc/riak.pem", "ca_path", "/usr/share/certificates"] Per the riak client docs, the above sample options will turn on SSL VERIFY_PEER`

tags DEPRECATED

  • DEPRECATED WARNING: This config item is deprecated. It may be removed in a further version.
  • Value type is array
  • Default value is []

Only handle events with all of these tags. Note that if you specify a type, the event must also match that type. Optional.

type DEPRECATED

  • DEPRECATED WARNING: This config item is deprecated. It may be removed in a further version.
  • Value type is string
  • Default value is ""

The type to act on. If a type is given, then this output will only act on messages with the same type. See any input plugin’s “type” attribute for more. Optional.

workers

  • Value type is number
  • Default value is 1

The number of workers to use for this output. Note that this setting may not be useful for all outputs.


This is documentation from lib/logstash/outputs/riak.rb