diff --git a/prometheus.go b/prometheus.go index 308ae2d..c40531a 100644 --- a/prometheus.go +++ b/prometheus.go @@ -11,9 +11,9 @@ func PrometheusBoot(port int) { http.Handle("/metrics", promhttp.Handler()) //启动web服务 go func() { - err := http.ListenAndServe("0.0.0.0"+strconv.Itoa(port), nil) + err := http.ListenAndServe("0.0.0.0:"+strconv.Itoa(port), nil) if err != nil { - log.Println("启动普罗米修斯失败:") + log.Println("启动普罗米修斯失败:", err) } log.Println("启动普罗米修斯成功 port:" + strconv.Itoa(port)) }()