From 99a5587a2165baf7298f201a63c1fa1298284778 Mon Sep 17 00:00:00 2001 From: Javier Marcos <1271349+javuto@users.noreply.github.com> Date: Thu, 25 Jan 2024 00:02:19 +0100 Subject: [PATCH] Line in status logs can be number or string --- logging/db.go | 2 +- types/osquery.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/logging/db.go b/logging/db.go index 96e45029..8c1c06dc 100644 --- a/logging/db.go +++ b/logging/db.go @@ -132,7 +132,7 @@ func (logDB *LoggerDB) Status(data []byte, environment, uuid string, debug bool) entry := OsqueryStatusData{ UUID: strings.ToUpper(l.HostIdentifier), Environment: environment, - Line: l.Line, + Line: strconv.Itoa(int(l.Line)), Message: l.Message, Version: l.Version, Filename: l.Filename, diff --git a/types/osquery.go b/types/osquery.go index 64b75e44..527c8a51 100644 --- a/types/osquery.go +++ b/types/osquery.go @@ -164,7 +164,7 @@ type LogResultData struct { // LogStatusData to be used processing status logs from nodes type LogStatusData struct { - Line string `json:"line"` + Line StringInt `json:"line"` Message string `json:"message"` Version string `json:"version"` Filename string `json:"filename"`