m3dev/fluent-plugin-http-list — pull request #5 by vdavidoff (2014-06-13 00:59:04+00:00)
Title: Enable configuration of a status key

This one is pretty specific to our environment, and may not be something you want to consider for your plugin, but I'm submitting it anyway because I'd like to avoid maintaining my own patches if possible.

The key (string) defined by status_key will result in normal processing of the payload, but in addition the response body will contain the string defined by status_response. If there is no payload (no messages), this results in a simple status/health check. If status_tag is nil, this feature is effectively disabled.

It may help to understand how we use this. One of the things that shoves logs into fluentd via http-list does so by first querying the POST endpoint with a GET with a specific URI (path), and expects to get back a string indicating the endpoint is ready to receive payload. So this patch allows me to set it up so that a configurable path (a key as far as this input is concerned) will generate a specific, configurable response in the response body.