From 96486b73af56c0663484d559dc95a769abe48a80 Mon Sep 17 00:00:00 2001 From: Toby Lawrence Date: Tue, 12 Mar 2024 09:20:22 -0400 Subject: [PATCH] Force HTTP logs when High Availability mode is enabled. --- comp/logs/agent/config/config.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/comp/logs/agent/config/config.go b/comp/logs/agent/config/config.go index e9f77a95db60b2..5bb10bbab66fc6 100644 --- a/comp/logs/agent/config/config.go +++ b/comp/logs/agent/config/config.go @@ -113,7 +113,9 @@ func BuildEndpointsWithConfig(coreConfig pkgconfigmodel.Reader, logsConfig *Logs log.Warnf("Use of illegal configuration parameter, if you need to send your logs to a proxy, "+ "please use '%s' and '%s' instead", logsConfig.getConfigKey("logs_dd_url"), logsConfig.getConfigKey("logs_no_ssl")) } - if logsConfig.isForceHTTPUse() || logsConfig.obsPipelineWorkerEnabled() || (bool(httpConnectivity) && !(logsConfig.isForceTCPUse() || logsConfig.isSocks5ProxySet() || logsConfig.hasAdditionalEndpoints())) { + + haEnabled := coreConfig.GetBool("ha.enabled") + if logsConfig.isForceHTTPUse() || logsConfig.obsPipelineWorkerEnabled() || haEnabled || (bool(httpConnectivity) && !(logsConfig.isForceTCPUse() || logsConfig.isSocks5ProxySet() || logsConfig.hasAdditionalEndpoints())) { return BuildHTTPEndpointsWithConfig(coreConfig, logsConfig, endpointPrefix, intakeTrackType, intakeProtocol, intakeOrigin) } log.Warnf("You are currently sending Logs to Datadog through TCP (either because %s or %s is set or the HTTP connectivity test has failed) "+