It sends event batches to the GELF endpoint. Transport level protocol TCP or UDP is configurable.
It doesn't support UDP chunking. So don't use UDP if event size may be greater than 8192.
GELF messages are separated by null byte. Each message is a JSON with the following fields:
versionstring=1.1hoststringshort_messagestringfull_messagestringtimestampnumberlevelnumber_extra_field_1string_extra_field_2string_extra_field_3string
Every field with an underscore prefix _ will be treated as an extra field.
Allowed characters in field names are letters, numbers, underscores, dashes, and dots.
Supports dead queue.
endpoint string required
An address of gelf endpoint. Format: HOST:PORT. E.g. localhost:12201.
reconnect_interval cfg.Duration default=1m
The plugin reconnects to endpoint periodically using this interval. It is useful if an endpoint is a load balancer.
connection_timeout cfg.Duration default=5s
How much time to wait for the connection?
write_timeout cfg.Duration default=10s
How much time to wait for the connection?
host_field string default=host
Which field of the event should be used as host GELF field.
short_message_field string default=message
Which field of the event should be used as short_message GELF field.
default_short_message_value string default=not set
The default value for short_message GELF field if nothing is found in the event.
full_message_field string
Which field of the event should be used as full_message GELF field.
timestamp_field string default=time
Which field of the event should be used as timestamp GELF field.
timestamp_field_format string default=rfc3339nano
In which format timestamp field should be parsed. Can be specified as a datetime layout in Go time.Parse format or by alias. List of available datetime format aliases can be found here.
level_field string default=level
Which field of the event should be used as a level GELF field. Level field should contain level number or string according to RFC 5424:
7ordebug6orinfo5ornotice4orwarning3orerror2orcritical1oralert0oremergency
Otherwise 6 will be used.
workers_count cfg.Expression default=gomaxprocs*4
How many workers will be instantiated to send batches.
batch_size cfg.Expression default=capacity/4
A maximum quantity of events to pack into one batch.
batch_size_bytes cfg.Expression default=0
A minimum size of events in a batch to send. If both batch_size and batch_size_bytes are set, they will work together.
batch_flush_timeout cfg.Duration default=200ms
After this timeout the batch will be sent even if batch isn't completed.
retry int default=0
After an insert error, fall with a non-zero exit code or not. A configured deadqueue disables fatal exits.
fatal_on_failed_insert bool default=false
After an insert error, fall with a non-zero exit code or not Experimental feature
retention cfg.Duration default=1s
Retention milliseconds for retry to DB.
retention_exponentially_multiplier int default=2
Multiplier for exponential increase of retention between retries
Generated using insane-doc