Commit 92dfc8ce authored by Derek Nola's avatar Derek Nola

Allow Pprof and Superisor metrics in standalone mode (#10576)

* Allow pprof to run on server with `--disable-agent` * Allow supervisor metrics to run on server with `--disable-agent` Signed-off-by: 's avatarDerek Nola <derek.nola@suse.com>
parent 1f30732d
......@@ -283,6 +283,18 @@ func RunStandalone(ctx context.Context, cfg cmds.Agent) error {
return err
}
if nodeConfig.SupervisorMetrics {
if err := metrics.DefaultMetrics.Start(ctx, nodeConfig); err != nil {
return errors.Wrap(err, "failed to serve metrics")
}
}
if nodeConfig.EnablePProf {
if err := profile.DefaultProfiler.Start(ctx, nodeConfig); err != nil {
return errors.Wrap(err, "failed to serve pprof")
}
}
<-ctx.Done()
return ctx.Err()
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment