logging-es set up the certification. fluentd needs to configure the connection information to connect to the logging-es.
Signed-off-by: Wu Zhende wuzhende666@163.com --- container/master-fluentd/docker-fluentd.conf | 2 ++ container/master-fluentd/start | 6 ++++++ 2 files changed, 8 insertions(+)
diff --git a/container/master-fluentd/docker-fluentd.conf b/container/master-fluentd/docker-fluentd.conf index 410f2eb..73d7103 100644 --- a/container/master-fluentd/docker-fluentd.conf +++ b/container/master-fluentd/docker-fluentd.conf @@ -42,6 +42,8 @@ @type elasticsearch host "#{ENV['LOGGING_ES_HOST']}" port "#{ENV['LOGGING_ES_PORT']}" + user "#{ENV['LOGGING_ES_USER']}" + password "#{ENV['LOGGING_ES_PASSWORD']}" suppress_type_name true flush_interval 1s num_threads 10 diff --git a/container/master-fluentd/start b/container/master-fluentd/start index a05881c..27aece9 100755 --- a/container/master-fluentd/start +++ b/container/master-fluentd/start @@ -9,11 +9,17 @@ require_relative '../defconfig.rb' names = Set.new %w[ LOGGING_ES_HOST LOGGING_ES_PORT + LOGGING_ES_USER + LOGGING_ES_PASSWORD ]
+account_info = relevant_service_account(names) + defaults = relevant_defaults(names) defaults['LOGGING_ES_HOST'] ||= '172.17.0.1' defaults['LOGGING_ES_PORT'] ||= '9202' +defaults.merge!(account_info) + env = docker_env(defaults)
docker_rm 'master-fluentd'