Search code examples
mongodbtls1.2fluentd

how to forward Fluentd to mongo using TLS


I want to forward my fluentd to mongodb atlas, which is use TLS for connection, did anyone now how to configure the fluentd? i already did something like this but its still connecting without tls

<source>
  @type forward
  port 24224
  bind 0.0.0.0
</source>

<match *.*>
  @type mongo_replset
  replica_set atlas-xxxx

  nodes cluster0-shard-00-00.xxx.mongodb.net:27017

  ...

  <transport tls>
    # i set this empty to used self generate certificate, is it possible?
  </transport>
</match>

Solution

  • just in case someone else having the same problem, im solving my problem with this config:

    <match *.*>
      @type mongo_replset
      connection_string mongodb+srv://user:[email protected]/yourdb
      replica_set atlas-xxxx-shard-0
    
      ssl true
      ssl_cert /tmp/tls/self-generated-cert.crt
    
      ...
    </match>