]> git.ipfire.org Git - thirdparty/ulogd2.git/commit
json: output messages in JSONv1 format
authorVincent Bernat <Vincent.Bernat@exoscale.ch>
Wed, 30 Sep 2015 12:32:07 +0000 (14:32 +0200)
committerEric Leblond <eric@regit.org>
Fri, 2 Oct 2015 10:11:36 +0000 (12:11 +0200)
commit0ea23cc7ad69556c71787a791fd8e13942540f16
treefb9088aa0ce3c36012e5e8caa9c7b3e12f2f3ad4
parentc9337b31f756cae85299c8275b21088ce02885e2
json: output messages in JSONv1 format

While Logstash is quite flexible in the JSON messages received, the
canonical format it "expects" is the JSON Event v1 format. The timestamp
should be keyed by `@timestamp` and there should be a `@version` key
whose value is 1. All other keys are free.

There is no formal specification of this format. It is however described
here:

 https://github.com/elastic/logstash/blob/1.5/lib/logstash/event.rb#L26-L47

It's useful to respect this format as it allows a user to use a less
capable receiver. The new format is enabled only when `eventv1=1` is set
in plugin configuration.

Signed-off-by: Vincent Bernat <Vincent.Bernat@exoscale.ch>
output/ulogd_output_JSON.c
ulogd.conf.in