Elasticsearch Encoder for Heka Payload-only Messages
The message payload must be pre-formatted JSON in an ElasticSearch compatible format.
1. Encoder Configuration Table
2. Functions
2.1. encode
Creates the ElasticSearch bulk API index JSON and combines it with the pre-formatted JSON from the message payload (a new line is added if necessary).
Arguments
- none
Return
- JSON (string, nil) Elasticsearch JSON or nil (skip no payload)
3. Sample Output
{"index":{"_index":"mylogger-2014.06.05","_type":"mytype-host.domain.com"}}
{"json":"data","extracted":"from","message":"payload"}
source code: payload.lua