Add support for elasticsearch TLS and authentication in fluentd

Add options for configuring TLS and authentication for elasticsearch
connections in in fluentd.

Change-Id: I936adc2aeaa3c87081be1c44aa0221caf2124e23
Closes-Bug: #1831078
This commit is contained in:
Krzysztof Klimonda 2019-05-30 13:26:50 +00:00
parent 86e9b0831c
commit fc24e9af7c
3 changed files with 46 additions and 0 deletions

View File

@ -45,6 +45,16 @@ common_services:
- "kolla_logs:/var/log/kolla/" - "kolla_logs:/var/log/kolla/"
dimensions: "{{ cron_dimensions }}" dimensions: "{{ cron_dimensions }}"
#######################
# TLS and authenication
#######################
fluentd_elasticsearch_path: ""
fluentd_elasticsearch_scheme: "http"
fluentd_elasticsearch_user: ""
fluentd_elasticsearch_password: ""
fluentd_elasticsearch_ssl_version: "TLSv1_2"
fluentd_elasticsearch_ssl_verify: "true"
#################### ####################
# Docker # Docker

View File

@ -12,6 +12,18 @@
type elasticsearch type elasticsearch
host {{ elasticsearch_address }} host {{ elasticsearch_address }}
port {{ elasticsearch_port }} port {{ elasticsearch_port }}
scheme {{ fluentd_elasticsearch_scheme }}
{% if fluentd_elasticsearch_path != '' %}
path {{ fluentd_elasticsearch_path }}
{% endif %}
{% if fluentd_elasticsearch_scheme == 'https' %}
ssl_version {{ fluentd_elasticsearch_ssl_version }}
ssl_verify {{ fluentd_elasticsearch_ssl_verify }}
{% endif %}
{% if fluentd_elasticsearch_user != '' and fluentd_elasticsearch_password != ''%}
user {{ fluentd_elasticsearch_user }}
password {{ fluentd_elasticsearch_password }}
{% endif %}
logstash_format true logstash_format true
logstash_prefix {{ kibana_log_prefix }} logstash_prefix {{ kibana_log_prefix }}
flush_interval 15s flush_interval 15s
@ -47,6 +59,18 @@
type elasticsearch type elasticsearch
host {{ elasticsearch_address }} host {{ elasticsearch_address }}
port {{ elasticsearch_port }} port {{ elasticsearch_port }}
scheme {{ fluentd_elasticsearch_scheme }}
{% if fluentd_elasticsearch_path != '' %}
path {{ fluentd_elasticsearch_path }}
{% endif %}
{% if fluentd_elasticsearch_scheme == 'https' %}
ssl_version {{ fluentd_elasticsearch_ssl_version }}
ssl_verify {{ fluentd_elasticsearch_ssl_verify }}
{% endif %}
{% if fluentd_elasticsearch_user != '' and fluentd_elasticsearch_password != ''%}
user {{ fluentd_elasticsearch_user }}
password {{ fluentd_elasticsearch_password }}
{% endif %}
logstash_format true logstash_format true
logstash_prefix {{ kibana_log_prefix }} logstash_prefix {{ kibana_log_prefix }}
flush_interval 15s flush_interval 15s

View File

@ -4,6 +4,18 @@
@type elasticsearch @type elasticsearch
host {{ elasticsearch_address }} host {{ elasticsearch_address }}
port {{ elasticsearch_port }} port {{ elasticsearch_port }}
scheme {{ fluentd_elasticsearch_scheme }}
{% if fluentd_elasticsearch_path != '' %}
path {{ fluentd_elasticsearch_path }}
{% endif %}
{% if fluentd_elasticsearch_scheme == 'https' %}
ssl_version {{ fluentd_elasticsearch_ssl_version }}
ssl_verify {{ fluentd_elasticsearch_ssl_verify }}
{% endif %}
{% if fluentd_elasticsearch_user != '' and fluentd_elasticsearch_password != ''%}
user {{ fluentd_elasticsearch_user }}
password {{ fluentd_elasticsearch_password }}
{% endif %}
logstash_format true logstash_format true
logstash_prefix {{ kibana_log_prefix }} logstash_prefix {{ kibana_log_prefix }}
flush_interval 15s flush_interval 15s