elasticsearch/logstash — pull request #1410 by monkeywidget (2014-05-28 18:51:25+00:00)
Title: sensu_json codec: bare-bones minimal implementation

This is an attempt to start the bridge to enable writing logstash event messages to the sensu infrastructure.

This codec may be used to encode (via logstash outputs) full JSON messages destined for Sensu, either directly through a socket (using "tcp" output and port 3030 on a client) or to the rabbitmq the logstash client would normally talk to.

At present the codec only formats the message, and adds the default values for fields required by sensu, if not already set. The hash incoming to the "encode" method is read by the codec, so if the fields are already set those values will not be overwritten.