|
|
@ -7,10 +7,6 @@ import (
|
|
|
|
"strconv"
|
|
|
|
"strconv"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
@Auth:ShenZ
|
|
|
|
|
|
|
|
@Description:
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
func PrometheusBoot(port int) {
|
|
|
|
func PrometheusBoot(port int) {
|
|
|
|
http.Handle("/metrics", promhttp.Handler())
|
|
|
|
http.Handle("/metrics", promhttp.Handler())
|
|
|
|
//启动web服务
|
|
|
|
//启动web服务
|
|
|
@ -19,7 +15,6 @@ func PrometheusBoot(port int) {
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
log.Fatal("启动普罗米修斯失败!")
|
|
|
|
log.Fatal("启动普罗米修斯失败!")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
log.Println("监控启动,端口为:" + strconv.Itoa(port))
|
|
|
|
log.Println("启动普罗米修斯监控成功! 端口:" + strconv.Itoa(port))
|
|
|
|
}()
|
|
|
|
}()
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|