orchard-fluentd-agent
===========

## Overview

This is a wrapper Docker image that runs the Fluentd Agent container. It installs the Datadog plugin and dynamically sets the API key in order to forward events to Datadog.

It exposes a UDP input source on port 5160 and an HTTP input source on port 8888. The default `in_forward` plugin and source has been disabled.

## Getting Started
- Run the container image
    * Image should be run with IAM privileges to pull down the `DD_API_KEY` secret from AWS secrets manager in the appropriate `Environment` namespace, e.g. dev/qa/prod
        * In Fargate, this is handled via task roles.
    * Locally, run with docker-compose. Make sure to run `awsume ${env}` first to generate credentials in your shell.

- Test the application

    ```bash
    curl -v -X POST -d 'json={"service_type":"fluentd_test","message":"fluentd_test"}' http://127.0.0.1:8888/application
    ```
