diff --git a/x-pack/osquerybeat/beater/osquery_runner.go b/x-pack/osquerybeat/beater/osquery_runner.go index a1c890a559d..bd426f1eb13 100644 --- a/x-pack/osquerybeat/beater/osquery_runner.go +++ b/x-pack/osquerybeat/beater/osquery_runner.go @@ -68,11 +68,11 @@ func (r *osqueryRunner) Run(parentCtx context.Context, runfn osqueryRunFunc) err // Wait until osquery runner exists wg.Wait() - - // Set the flags to use - flags = newFlags } + // Set the flags to use + flags = newFlags + // Start osqueryd if not running if cn == nil { r.log.Info("Start osqueryd")