This commit is contained in:
wangchuxiao
2023-02-22 19:51:14 +08:00
parent 2b38381296
commit 94d50a6c71
31 changed files with 500 additions and 602 deletions
+2 -2
View File
@@ -11,10 +11,10 @@ import (
"github.com/prometheus/client_golang/prometheus/promhttp"
)
func StartPromeSrv(promethuesPort int) error {
func StartPromeSrv(prometheusPort int) error {
if config.Config.Prometheus.Enable {
http.Handle("/metrics", promhttp.Handler())
err := http.ListenAndServe(":"+strconv.Itoa(promethuesPort), nil)
err := http.ListenAndServe(":"+strconv.Itoa(prometheusPort), nil)
return err
}
return nil