Fluentd Conditional Matches Based on Environment Variables
You can enable/disable FluentD Matches with environment variables in following way. Below is fluent.conf. <source> @type dummy dummy {"hello":"world"} @label @DUMMY tag dummy </source> <label @DUMMY> <match dummy> @type copy copy_mode deep <store> @type relabel @label @OPENSEARCH </store> <store> @type relabel @label @ELASTICSEARCH </store> </match> </label> <label @OPENSEARCH> @include "#{ENV['FLUENTD_OPENSEARCH']}" </label> <label @ELASTICSEARCH> @include "#{ENV['FLUENTD_ELASTICSEARCH']}" </label> Following is the content for fluent-elasticsearch.conf. For testing purpose, we will send events to stdout....