Skip to content

Commit 4e4b838

Browse files
committed
[PLAT-17095] Disable otel health check if audit log are disabled
Summary: The otel collector health check should not be run if DBAL is enabled and then disabled later. Test Plan: Manually tested enabling and disabling audit logging. Verified health check runs correctly only when export is active. Run itests. Run UTs. Reviewers: amalyshev Reviewed By: amalyshev Differential Revision: https://phorge.dev.yugabyte.com/D43365
1 parent fdf5a2b commit 4e4b838

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

managed/src/main/java/com/yugabyte/yw/commissioner/HealthChecker.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
import com.yugabyte.yw.models.helpers.CommonUtils;
6060
import com.yugabyte.yw.models.helpers.NodeDetails;
6161
import com.yugabyte.yw.models.helpers.PlatformMetrics;
62+
import com.yugabyte.yw.models.helpers.audit.AuditLogConfig;
6263
import jakarta.mail.MessagingException;
6364
import java.io.IOException;
6465
import java.io.InputStream;
@@ -832,6 +833,11 @@ public void checkSingleUniverse(CheckSingleUniverseParams params) {
832833
: nodeInfo.getYbHomeDir());
833834
}
834835
nodeInfo.setOtelCollectorEnabled(params.universe.getUniverseDetails().otelCollectorEnabled);
836+
// Check if audit log export was ever enabled and disabled.
837+
AuditLogConfig auditLogConfig = cluster.userIntent.auditLogConfig;
838+
if (auditLogConfig != null) {
839+
nodeInfo.setOtelCollectorEnabled(auditLogConfig.isExportActive());
840+
}
835841
nodeInfo.setClockboundEnabled(
836842
params.universe.getUniverseDetails().getPrimaryCluster().userIntent.isUseClockbound());
837843
nodeMetadata.add(nodeInfo);

0 commit comments

Comments
 (0)