From f2d3683d804c72af7c51600b299dbe52ee79a244 Mon Sep 17 00:00:00 2001 From: Zachary Wasserman Date: Fri, 2 Oct 2020 13:23:54 -0700 Subject: [PATCH] Log host identifier in EnrollAgent service logging (#2313) This can help identify circumstances in which multiple hosts are providing the same identifier and clobbering the node key for each other. --- server/service/logging_osquery.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/service/logging_osquery.go b/server/service/logging_osquery.go index b0423a9bf8..1d3ead5c39 100644 --- a/server/service/logging_osquery.go +++ b/server/service/logging_osquery.go @@ -21,6 +21,7 @@ func (mw loggingMiddleware) EnrollAgent(ctx context.Context, enrollSecret string "method", "EnrollAgent", "ip_addr", ctx.Value(kithttp.ContextKeyRequestRemoteAddr).(string), "x_for_ip_addr", ctx.Value(kithttp.ContextKeyRequestXForwardedFor).(string), + "host_identifier", hostIdentifier, "err", err, "took", time.Since(begin), )