Using logstash-logback-encoder to log data into elasticSearch

Viewed 170

I want to use logstash-logback-encoder to log the data into elastic search. My configuration follows:

<appender name="logstashAppender" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
    <destination>${elasticUrl}</destination>
    <keepAliveDuration>5 minutes</keepAliveDuration>
    <encoder class="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder">
        <providers>
            <message/>
        </providers>
    </encoder>
</appender>

However, how do i configure index i want it to be sent into? And according to git, there is only SSL support, what if my elastic has password authentication?

Is there a way how to add index where the data should be routed?

0 Answers
Related