@@ -195,15 +195,9 @@ func (cp *commonPage) network(c *gin.Context) {
195195 // 从监控配置中获取有监控任务的服务器ID
196196 if singleton .ServiceSentinelShared != nil {
197197 monitors := singleton .ServiceSentinelShared .Monitors ()
198- if singleton .Conf .Debug {
199- log .Printf ("network: 找到 %d 个监控配置" , len (monitors ))
200- }
201198
202199 for _ , monitor := range monitors {
203200 if monitor != nil {
204- if singleton .Conf .Debug {
205- log .Printf ("network: 处理监控配置 %d: %s" , monitor .ID , monitor .Name )
206- }
207201 // 检查哪些服务器被这个监控任务覆盖
208202 singleton .ServerLock .RLock ()
209203 for serverID , server := range singleton .ServerList {
@@ -232,9 +226,6 @@ func (cp *commonPage) network(c *gin.Context) {
232226 }
233227 if ! found {
234228 serverIdsWithMonitor = append (serverIdsWithMonitor , serverID )
235- if singleton .Conf .Debug {
236- log .Printf ("network: 添加服务器 %d (%s) 到监控列表 (Cover=%d)" , serverID , server .Name , monitor .Cover )
237- }
238229 }
239230 // 如果还没有选定ID,或者服务器在线,则将此服务器ID设为当前ID
240231 if id == 0 || server .IsOnline {
@@ -249,10 +240,6 @@ func (cp *commonPage) network(c *gin.Context) {
249240 }
250241 }
251242
252- if singleton .Conf .Debug {
253- log .Printf ("network: 从监控配置获取到 %d 个有监控任务的服务器" , len (serverIdsWithMonitor ))
254- }
255-
256243 // 如果仍然没有找到ID,并且有排序列表,则使用排序列表中的第一个ID
257244 singleton .SortedServerLock .RLock ()
258245 if id == 0 && singleton .SortedServerList != nil && len (singleton .SortedServerList ) > 0 {
@@ -351,9 +338,6 @@ func (cp *commonPage) network(c *gin.Context) {
351338 var monitorHistories interface {}
352339 if singleton .Conf .DatabaseType == "badger" {
353340 // BadgerDB 模式,查询监控历史记录
354- if singleton .Conf .Debug {
355- log .Printf ("network: BadgerDB模式,查询监控历史记录" )
356- }
357341
358342 // BadgerDB模式,使用BadgerDB查询监控历史记录
359343 if db .DB != nil && id > 0 {
@@ -376,7 +360,7 @@ func (cp *commonPage) network(c *gin.Context) {
376360 }
377361 }
378362
379- // 默认显示第一个服务器的ICMP /TCP监控记录
363+ // 显示指定服务器的所有ICMP /TCP监控记录(来自所有监测点)
380364 var filteredHistories []model.MonitorHistory
381365
382366 for _ , h := range allHistories {
0 commit comments