1

I have installed an EFK stack to log nginx access log.

While using fresh install Im able to send data from Fluentd to elasticsearch without any problem. However, I installed searchguard to implement authentication on elasticsearch and kibana. Now Im able to login to Kibana and elasticsearch with searchguards demo user credentials.

Now my problem is that fluentd is unable to to connect to elasticsearch. From td-agent log im getting the following messages:

2018-07-19 15:20:34 +0600 [warn]: #0 failed to flush the buffer. retry_time=5 next_retry_seconds=2018-07-19 15:20:34 +0600 chunk="57156af05dd7bbc43d0b1323fddb2cd0" error_class=Fluent::Plugin::ElasticsearchOutput::ConnectionFailure error="Can not reach Elasticsearch cluster ({:host=>\"<elasticsearch-ip>\", :port=>9200, :scheme=>\"http\", :user=>\"logstash\", :password=>\"obfuscated\"})!"

Here is my Fluentd config

<source>
    @type forward
</source>
<match user_count.**>
    @type copy
    <store>
    @type elasticsearch
        host https://<elasticsearch-ip>
        port 9200
    ssl_verify false
    scheme https
        user "logstash"
        password "<logstash-password>"
        index_name "custom_user_count"
        include_tag_key true
        tag_key "custom_user_count"
        logstash_format true
        logstash_prefix "custom_user_count"
        type_name "custom_user_count"
    utc_index false
        <buffer>
            flush_interval 2s
        </buffer>
    </store>
</match>

sg_roles.yml:

sg_logstash:
  cluster:
    - CLUSTER_MONITOR
    - CLUSTER_COMPOSITE_OPS
    - indices:admin/template/get
    - indices:admin/template/put
  indices:
    'custom*':
      '*':
        - CRUD
        - CREATE_INDEX
    'logstash-*':
      '*':
        - CRUD
        - CREATE_INDEX
    '*beat*':
      '*':
        - CRUD
        - CREATE_INDEX

Can anyone help me on this?

srgbnd
  • 5,404
  • 9
  • 44
  • 80
muttalebm
  • 552
  • 1
  • 6
  • 22

1 Answers1

1

It seemed td-agent was using TLSv1 as default added ssl_version TLSv1_2 to the config and now working

muttalebm
  • 552
  • 1
  • 6
  • 22