childe / gohangout

使用 golang 模仿的 Logstash。用于消费 Kafka 数据,处理后写入 ES、Clickhouse 等。
MIT License
1.01k stars 234 forks source link

是否支持ES认证写入 #154

Closed ixiaoyi93 closed 2 years ago

ixiaoyi93 commented 2 years ago

目前我司ES是通过 searchguard 实现的es集群安全访问,在 logstash 的 output 模块配置如下:

output {
    elasticsearch {
        hosts => ["192.168.1.1","192.168.1.11","192.168.1.21"]
        index => "%{platform}-%{index_date}"
        ssl => true
        ssl_certificate_verification => false
        truststore => "/data/app/logstash/truststore.jks"
        truststore_password => "xxxxxxxxxxxxx"
        user => logstash
        password => xxxxxxxxxx
        document_type => "log"
        template_overwrite => true
    }

目前gohangout是否支持呢

ximply commented 2 years ago

@XiaoMuYi You can see source code: https://github.com/childe/gohangout/blob/master/output/elasticsearch_output.go

childe commented 2 years ago

@XiaoMuYi https://stackoverflow.com/questions/53444015/golang-httpclient-ca-certificates-default-location 放证书的路径位置在这里