mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-14 07:34:43 +08:00
1.websocket接受消息,每15秒监控最大耗时消息类型,某消息处理超过300ms会有监控日志
2.GoQueue处理队列监控,每1分钟汇报积压处理的最大量。并监控死循环
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"github.com/duanhf2012/origin/originnode"
|
||||
"github.com/duanhf2012/origin/sysservice"
|
||||
"github.com/duanhf2012/origin/sysservice/originhttp"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
||||
@@ -31,6 +32,9 @@ func main() {
|
||||
return
|
||||
}
|
||||
|
||||
//打开Module死循环监控
|
||||
node.EnableMonitorModule(time.Second*5)
|
||||
|
||||
nodeCfg, _ := cluster.ReadNodeConfig("./config/nodeconfig.json", cluster.GetNodeId())
|
||||
httpserver := originhttp.NewHttpServerService(nodeCfg.HttpPort) // http服务
|
||||
for _, ca := range nodeCfg.CAFile {
|
||||
@@ -46,6 +50,7 @@ func main() {
|
||||
httpserver.SetPrintRequestTime(true)
|
||||
|
||||
node.SetupService(httpserver,pTcpService)
|
||||
|
||||
node.Init()
|
||||
node.Start()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user