mozilla

Payload EncoderΒΆ

Plugin Name: PayloadEncoder

The PayloadEncoder simply extracts the payload from the provided Heka message and converts it into a byte stream for delivery to an external resource.

Config:

  • append_newlines (bool, optional):

    Specifies whether or not a newline character (i.e. n) will be appended to the captured message payload before serialization. Defaults to true.

  • prefix_ts (bool, optional):

    Specifies whether a timestamp will be prepended to the captured message payload before serialization. Defaults to false.

  • ts_from_message (bool, optional):

    If true, the prepended timestamp will be extracted from the message that is being processed. If false, the prepended timestamp will be generated by the system clock at the time of message processing. Defaults to true. This setting has no impact if prefix_ts is set to false.

  • ts_format (string, optional):

    Specifies the format that should be used for prepended timestamps, using Go’s standard time format specification strings. Defaults to [2006/Jan/02:15:04:05 -0700]. If the specified format string does not end with a space character, then a space will be inserted between the formatted timestamp and the payload.

Example

[PayloadEncoder]
append_newlines = false
prefix_ts = true
ts_format = "2006/01/02 3:04:05PM MST"