From caa0cf3a801a6ba94a9df7dbca72791a00f1c4da Mon Sep 17 00:00:00 2001 From: Sven Rebhan <36194019+srebhan@users.noreply.github.com> Date: Wed, 12 Jun 2024 11:16:10 -0400 Subject: [PATCH] fix(agent): Ignore startup-errors in test mode (#15488) --- agent/agent.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/agent/agent.go b/agent/agent.go index 7ebbb82c8..d9c3a6c03 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -436,7 +436,7 @@ func (a *Agent) runInputs( } // testStartInputs is a variation of startInputs for use in --test and --once -// mode. It differs by logging Start errors and returning only plugins +// mode. It differs by logging Start errors and returning only plugins // successfully started. func (a *Agent) testStartInputs( dst chan<- telegraf.Metric, @@ -458,6 +458,7 @@ func (a *Agent) testStartInputs( if err := input.Start(acc); err != nil { log.Printf("E! [agent] Starting input %s: %v", input.LogName(), err) + continue } unit.inputs = append(unit.inputs, input)