|
|
|
@ -11,7 +11,7 @@ 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.Fatal("启动普罗米修斯失败!", err)
|
|
|
|
|
}
|
|
|
|
|