diff --git a/agent/agent.go b/agent/agent.go index aa3e32a43095c..636c4ba68ff06 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -235,6 +235,9 @@ func (a *Agent) Test(ctx context.Context, waitDuration time.Duration) error { a.stopServiceInputs() } + if NErrors.Get() > 0 { + return fmt.Errorf("One or more input plugins had an error") + } return nil }