diff --git a/config/config.yaml b/config/config.yaml index d6c8ab292..d1cde9b45 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -395,7 +395,7 @@ callback: # The number of Prometheus ports per service needs to correspond to rpcPort # The number of ports needs to be consistent with msg_transfer_service_num in script/path_info.sh prometheus: - enable: false + enable: true userPrometheusPort: [ 20110 ] friendPrometheusPort: [ 20120 ] messagePrometheusPort: [ 20130 ] diff --git a/pkg/common/startrpc/start.go b/pkg/common/startrpc/start.go index 4528c03a1..8f7132814 100644 --- a/pkg/common/startrpc/start.go +++ b/pkg/common/startrpc/start.go @@ -104,6 +104,7 @@ func Start( } go func() { if config.Config.Prometheus.Enable && prometheusPort != 0 { + prome.Enable = true if err := prome.StartPrometheusSrv(prometheusPort); err != nil { panic(err.Error()) }