Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
docs(platform-logging): Add section on custom fluentd plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Chauncey committed Apr 28, 2017
1 parent e744efd commit 8c223b5
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 6 deletions.
33 changes: 33 additions & 0 deletions src/managing-workflow/platform-logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,36 @@ Then run `helm install ./workflow --namespace deis` to install the modified char
### Customizing:

We currently support logging information to Syslog, Elastic Search, and Sumo Logic. However, we will gladly accept pull requests that add support to other locations. For more information please visit the [fluentd repository](https://github.com/deis/fluentd).


### Custom Fluentd Plugins

That are many output plugins available for [Fluentd](https://github.com/search?q=fluentd+output&ref=opensearch). But, we purposefully do not ship our Fluentd image with these installed. Instead, we provide a mechanism that allows users to install a plugin at startup time of the container and configure it.

If you would like to install a plugin you can set an environment variable such as the following: `FLUENTD_PLUGIN_N=some-fluentd-plugin` where N is a positive integer that is incremented for every plugin you wish to install. After you set this value you must then set the configuration text for the `FILTER` or `STORE` plugin you are installing. You can do that by setting `CUSTOM_STORE_N=configuration text` where N is the corresponding index value of the plugin you just installed.

Here is an example of setting the values directly in the manifest of the daemonset.

```
env:
- name: "FLUENTD_PLUGIN_1"
value: "fluent-plugin-kafka"
- name: "CUSTOM_STORE_1"
value: |
<store>
@type kafka \
default_topic some_topic
</store>
```

Or you could configure it using the `daemon_environment` key in the `values.yaml`:

```
fluentd:
daemon_environment:
FLUENTD_PLUGIN_1: "fluent-plugin-kafka"
CUSTOM_STORE_1: "|\n <store>\n @type kafka\n default_topic some_topic\n </store>"
INSTALL_BUILD_TOOLS: "|\n true"
```

For more information please see the [Custom Plugins](https://github.com/deis/fluentd#custom-plugins) section of the README.
24 changes: 18 additions & 6 deletions src/managing-workflow/tuning-component-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,24 @@ BACKUPS_TO_RETAIN | number of base backups the backing store should retain (defa

## Customizing Fluentd

The following environment variables are tunable for [Fluentd][logger]:

Setting | Description
----------------- | ---------------------------------
SYSLOG_HOST_1 | The hostname of a remote syslog endpoint for shipping logs
SYSLOG_PORT_1 | The port of a remote syslog endpoint for shipping logs
The following values can be changed in the `values.yaml` file or by using the `--set` flag with the Helm CLI.

Key | Default | Description
------------------| --------| ---------------------------------
syslog.host | "" | Host value of a syslog endpoint
syslog.port | "" | Port value of a syslog endpoint
sources.start_script | false | Capture kubernetes start script logs
sources.docker | false | Capture docker daemon logs
sources.etcd | false | Capture etcd logs
sources.kubelet | false | Capture kubelet logs
sources.kube_api | false | Capture Kubernetes API logs
sources.controller | false | Capture Kubernetes Controller logs
sources.scheduler | false | Capture Kubernetes Scheduler logs
output.disable_deis | false | Disable the Deis output plugin
boot.install_build_tools | false | Install the build tools package. This is useful when using custom plugins
daemon_environment | | Takes key-value pairs and turns them into environment variables.

For more information about the various environment variables that can be set please see the [README](https://github.com/deis/fluentd/blob/master/README.md)

## Customizing the Logger

Expand Down

0 comments on commit 8c223b5

Please sign in to comment.