Created
September 13, 2019 21:22
-
-
Save richm/6debc2f134f3bfd050625cbc167b0f1d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Make a working directory for holding your copies of various configmaps used by Fluentd. You will use this directory for subsequent steps below. The steps below assume the current directory is this directory: | |
mkdir working_dir | |
cd working_dir | |
Make sure you are in the logging project. This will be openshift-logging: | |
oc project openshift-logging | |
Make a copy of the current logging-fluentd configmap: | |
oc extract configmap/logging-fluentd --to=. | |
Make a copy of the original fluent.conf: | |
if [ ! -f fluent.conf.orig ] ; then | |
cp fluent.conf fluent.conf.orig | |
fi | |
Edit fluent.conf - look for this: | |
<label @OUTPUT> | |
## matches | |
@include configs.d/openshift/output-pre-*.conf | |
Add a line between the line containing `## matches` and `@include configs.d/openshift/output-pre-*.conf` like this: | |
@include configs.d/user/convert-to-single-index.conf | |
Add a new file to the current directory called convert-to-single-index.conf like this: | |
<filter **> | |
@type record_transformer | |
<record> | |
viaq_index_name myindexname | |
</record> | |
</filter> | |
Where `myindexname` is whatever indexname the customer wants to use. | |
Delete the configmap (that you saved above): | |
oc delete cm logging-fluentd | |
Create the new one from the files in the current directory: | |
oc create configmap logging-fluentd --from-file=. | |
Then restart fluentd (e.g. oc delete pod logging-fluentd-zzzz) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment