From 182972eb0015e0da1190ef2a2ff15fca36f4ba4c Mon Sep 17 00:00:00 2001 From: Ida Hou Date: Fri, 31 Jan 2025 21:24:12 +0000 Subject: [PATCH] health checks logs are not ingested to Cloud Logging - debugging --- integration_test/ops_agent_test/main_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/integration_test/ops_agent_test/main_test.go b/integration_test/ops_agent_test/main_test.go index b6f1398f67..cf139b2623 100644 --- a/integration_test/ops_agent_test/main_test.go +++ b/integration_test/ops_agent_test/main_test.go @@ -3814,6 +3814,7 @@ func TestLoggingSelfLogs(t *testing.T) { } queryHealthCheck := fmt.Sprintf(`severity="INFO" AND labels."agent.googleapis.com/health/agentKind"="ops-agent" AND labels."agent.googleapis.com/health/agentVersion"=~"^\d+\.\d+\.\d+.*$" AND labels."agent.googleapis.com/health/schemaVersion"="v1"`) + queryHealthCheck = "" if err := gce.WaitForLog(ctx, logger.ToMainLog(), vm, "ops-agent-health", time.Hour, queryHealthCheck); err != nil { t.Error(err) } @@ -3822,6 +3823,7 @@ func TestLoggingSelfLogs(t *testing.T) { // "LogPingOpsAgent" to show. We can remove wait when feature b/319102785 is complete. time.Sleep(10*time.Minute - time.Now().Sub(start)) queryPing := fmt.Sprintf(`severity="DEBUG" AND jsonPayload.code="LogPingOpsAgent" AND labels."agent.googleapis.com/health/agentKind"="ops-agent" AND labels."agent.googleapis.com/health/agentVersion"=~"^\d+\.\d+\.\d+.*$" AND labels."agent.googleapis.com/health/schemaVersion"="v1"`) + queryPing = "" if err := gce.WaitForLog(ctx, logger.ToMainLog(), vm, "ops-agent-health", time.Hour, queryPing); err != nil { t.Error(err) }