From ba96ee39124c3b5873eb48de70f80d22d74142ec Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Mon, 9 Mar 2026 15:40:57 -0700 Subject: [PATCH] Fix unlogged frequent collector error Improve frequentcollector error messages --- agent/association/frequentcollector/frequentcollector.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/agent/association/frequentcollector/frequentcollector.go b/agent/association/frequentcollector/frequentcollector.go index 597296b49..871b04d1f 100644 --- a/agent/association/frequentcollector/frequentcollector.go +++ b/agent/association/frequentcollector/frequentcollector.go @@ -301,16 +301,19 @@ func (collector *FrequentCollector) getValidInventoryGathererConfigMap(context c } if dataB, err = json.Marshal(pluginState.Configuration.Properties); err != nil { - log.Error("error occurred while json.Marshal(pluginState.Configuration.Properties)") + log.Errorf("error occurred while json.Marshal(pluginState.Configuration.Properties): %s", err) return } if err = json.Unmarshal(dataB, &inventoryInput); err != nil { - log.Error("error occurred while json.Unmarshal(dataB, &inventoryInput)") + log.Errorf("error occurred while json.Unmarshal(dataB, &inventoryInput): %s", err) return } log.Debugf("unmarshal channel response: %v", inventoryInput) validGatherers, err = plugin.ValidateInventoryInput(context, inventoryInput) + if err != nil { + log.Errorf("error occured validating inventory input: %s", err) + } return }