riemann

edit
  • Version: 3.0.0
  • Released on: 2016-11-11
  • Changelog
  • Compatible: 5.1.1.1, 5.0.0, 2.4.1, 2.4.0, 2.3.4

This plugin does not ship with Logstash by default, but it is easy to install by running bin/logstash-plugin install logstash-output-riemann.

Riemann is a network event stream processing system.

While Riemann is very similar conceptually to Logstash, it has much more in terms of being a monitoring system replacement.

Riemann is used in Logstash much like statsd or other metric-related outputs

You can learn about Riemann here:

 

Synopsis

edit

This plugin supports the following configuration options:

Required configuration options:

riemann {
}

Available configuration options:

Setting Input type Required Default value

codec

codec

No

"plain"

debug

boolean

No

false

enable_metric

boolean

No

true

host

string

No

"localhost"

id

string

No

map_fields

boolean

No

false

port

number

No

5555

protocol

string, one of ["tcp", "udp"]

No

"tcp"

riemann_event

hash

No

sender

string

No

"%{host}"

workers

<<,>>

No

1

Details

edit

 

codec

edit
  • 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.

debug

edit
  • Value type is boolean
  • Default value is false

Enable debugging output?

enable_metric

edit
  • Value type is boolean
  • Default value is true

Disable or enable metric logging for this specific plugin instance by default we record all the metrics we can, but you can disable metrics collection for a specific plugin.

host

edit
  • Value type is string
  • Default value is "localhost"

The address of the Riemann server.

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

Add a unique ID to the plugin instance, this ID is used for tracking information for a specific configuration of the plugin.

output {
 stdout {
   id => "ABC"
 }
}

If you don’t explicitely set this variable Logstash will generate a unique name.

map_fields

edit
  • Value type is boolean
  • Default value is false

If set to true automatically map all logstash defined fields to riemann event fields. All nested logstash fields will be mapped to riemann fields containing all parent keys separated by dots and the deepest value.

As an example, the logstash event:

   {
     "@timestamp":"2013-12-10T14:36:26.151+0000",
     "@version": 1,
     "message":"log message",
     "host": "host.domain.com",
     "nested_field": {
                       "key": "value"
                     }
   }

Is mapped to this riemann event:

  {
    :time 1386686186,
    :host host.domain.com,
    :message log message,
    :nested_field.key value
  }

It can be used in conjunction with or independent of the riemann_event option. When used with the riemann_event any duplicate keys receive their value from riemann_event instead of the logstash event itself.

port

edit
  • Value type is number
  • Default value is 5555

The port to connect to on your Riemann server.

protocol

edit
  • Value can be any of: tcp, udp
  • Default value is "tcp"

The protocol to use UDP is non-blocking TCP is blocking

Logstash’s default output behaviour is to never lose events As such, we use tcp as default here

riemann_event

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

A Hash to set Riemann event fields (http://riemann.io/concepts.html).

The following event fields are supported: description, state, metric, ttl, service

Tags found on the Logstash event will automatically be added to the Riemann event.

Any other field set here will be passed to Riemann as an event attribute.

Example:

    riemann {
        riemann_event => {
            "metric"  => "%{metric}"
            "service" => "%{service}"
        }
    }

metric and ttl values will be coerced to a floating point value. Values which cannot be coerced will zero (0.0).

description, by default, will be set to the event message but can be overridden here.

sender

edit
  • Value type is string
  • Default value is "%{host}"

The name of the sender. This sets the host value in the Riemann event

workers

edit
  • Value type is string
  • Default value is 1

TODO remove this in Logstash 6.0 when we no longer support the :legacy type This is hacky, but it can only be herne