We need to configure a net.logstash.logback.appender.LogstashTcpSocketAppender
to connect to DataDog
, however, the server that needs to send out these logs only works with a proxy. We are running on WebSphere Application Server.
We tried settings the -Dhttp.proxyHost
and -Dhttp.proxyPort
and -Dhttps.proxyHost
and -Dhttps.proxyPort
in Application servers
, our instance
, Process definition
, Java Virtual Machine
in Generic JVM Arguments, but other then messing up the other http calls, it did nothing for the appender.
How can I configure the proxy for the LogstashTcpSocketAppender
, without overriding every http call with JVM settings?
<!-- See https://docs.datadoghq.com/logs/log_collection/java/?tab=log4j&site=eu for the JSON_TCP appender -->
<appender name="JSON_TCP" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<destination>tcp-intake.logs.datadoghq.eu:443</destination>
<keepAliveDuration>20 seconds</keepAliveDuration>
<encoder class="net.logstash.logback.encoder.LogstashEncoder">
<prefix class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>API_KEY_OMITTED %mdc{keyThatDoesNotExist}</pattern>
</layout>
</prefix>
</encoder>
<addDefaultStatusListener>false</addDefaultStatusListener>
<writeBufferSize>1024</writeBufferSize>
</appender>