diff --git a/cmd/servicechecker/main.go b/cmd/servicechecker/main.go index e47b416..9be32d7 100644 --- a/cmd/servicechecker/main.go +++ b/cmd/servicechecker/main.go @@ -45,10 +45,12 @@ func main() { ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, os.Kill) defer stop() - m := victoriametrics.NewMeter( + mopts := []meter.Option{ victoriametrics.PrometheusCompat(true), - // meter.WriteFDMetrics(true), - // meter.WriteProcessMetrics(true), + } + + m := victoriametrics.NewMeter( + mopts..., ) l := slog.NewLogger(logger.WithMeter(m)) @@ -71,6 +73,13 @@ func main() { l.Fatal(ctx, "failed to open config", err) } + if !cfg.App.MultiUser { + m.Init( + meter.WriteFDMetrics(true), + meter.WriteProcessMetrics(true), + ) + } + l.Info(ctx, "scheduler: create") sch, err := scheduler.NewScheduler() if err != nil {