From 9218d22954d61296a32c49373ab0f17f0be59cfe Mon Sep 17 00:00:00 2001 From: zwlucas Date: Fri, 29 May 2026 17:41:33 -0300 Subject: feat: add SSL info tracking and server metrics collection Signed-off-by: zwlucas --- backend/internal/monitor/worker.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'backend/internal/monitor/worker.go') diff --git a/backend/internal/monitor/worker.go b/backend/internal/monitor/worker.go index 70855a2..34a5cba 100644 --- a/backend/internal/monitor/worker.go +++ b/backend/internal/monitor/worker.go @@ -166,9 +166,16 @@ func (w *Worker) checkService(ctx context.Context, svc model.Service) { checkCtx, cancel := context.WithTimeout(ctx, w.timeout) defer cancel() - hb := CheckHTTP(checkCtx, svc.URL, svc.KeywordToFind) + hb, ssl := CheckHTTP(checkCtx, svc.URL, svc.KeywordToFind) hb.ServiceID = svc.ID + if ssl != nil { + ssl.ServiceID = svc.ID + if err := w.store.SaveSSLInfo(*ssl); err != nil { + log.Printf("[worker] erro ao salvar ssl info: %v", err) + } + } + w.results <- checkResult{Heartbeat: hb, Service: svc} } -- cgit v1.2.3