GELF output. This is most useful if you want to use logstash to output events to graylog2.
More information at http://www.graylog2.org/about/gelf
output {
gelf {
chunksize => ... # number (optional), default: 1420
custom_fields => ... # hash (optional), default: {}
facility => ... # array (optional), default: ["%{facility}", "logstash-gelf"]
host => ... # string (required)
level => ... # array (optional), default: ["%{severity}", "INFO"]
port => ... # number (optional), default: 12201
sender => ... # string (optional), default: "%{@source_host}"
ship_metadata => ... # boolean (optional), default: true
tags => ... # array (optional), default: []
type => ... # string (optional), default: ""
}
}
The GELF chunksize. You usually don't need to change this.
The GELF custom field mappings. GELF supports arbitrary attributes as custom
fields. This exposes that. Exclude the _ portion of the field name
e.g. custom_fields => ['foo_field', 'some_value']
setsfoofield=some_value`
The GELF facility. Dynamic values like %{foo} are permitted here; this is useful if you need to use a value from the event as the facility name.
graylog2 server address
The GELF message level. Dynamic values like %{level} are permitted here; useful if you want to parse the 'log level' from an event and use that as the gelf level/severity.
Values here can be integers [0..7] inclusive or any of "debug", "info", "warn", "error", "fatal", "unknown" (case insensitive). Single-character versions of these are also valid, "d", "i", "w", "e", "f", "u"
graylog2 server port
Allow overriding of the gelf 'sender' field. This is useful if you want to use something other than the event's source host as the "sender" of an event. A common case for this is using the application name instead of the hostname.
Ship metadata within event object?
Only handle events with all of these tags. Note that if you specify a type, the event must also match that type. Optional.
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.