通知内 IP 脱敏

This commit is contained in:
naiba
2021-05-27 20:48:12 +08:00
parent 06914eed99
commit 2b05dcfc23
9 changed files with 76 additions and 8 deletions

View File

@@ -275,7 +275,9 @@ func (ss *ServiceSentinel) worker() {
}
stateStr := getStateStr(upPercent)
if Conf.Debug {
log.Println("服务监控上报:", ss.monitors[mh.MonitorID].Target, stateStr, "上报者:", r.Reporter, "是否正常:", mh.Successful, "请求输出:", mh.Data)
ServerLock.RLock()
log.Println("服务监控上报:", ss.monitors[mh.MonitorID].Target, stateStr, "上报者:", ServerList[r.Reporter].Name, "是否正常:", mh.Successful, "请求输出:", mh.Data)
ServerLock.RUnlock()
}
if stateStr == "故障" || stateStr != ss.lastStatus[mh.MonitorID] {
ss.monitorsLock.RLock()