Browse Source

增加时间日志

dev
18209 2 days ago
parent
commit
4dc736bbeb
  1. 2
      consumers/consumerSavoirTheme.go

2
consumers/consumerSavoirTheme.go

@ -146,6 +146,7 @@ func (the *consumerSavoirTheme) judgeOffline() {
for _, theme := range allThemes {
offlineMin := now.Sub(theme.CollectTime).Minutes()
log.Printf("s:%d,f:%d,sensor:%d 离线%f min", gap.StructId, gap.FactorId, theme.Sensor, offlineMin)
log.Printf("s:%d,f:%d,sensor:%d 采集时间%s 当前时间%s", gap.StructId, gap.FactorId, theme.Sensor, theme.CollectTime, now)
//拿到当前es最后一条数据和当前数据库的配置之后去查是否产生告警
StrValue := "80040003"
@ -182,6 +183,7 @@ func (the *consumerSavoirTheme) judgeOffline() {
}
}
}
log.Printf("%f,%f", offlineMin, float64(gap.OfflineGap))
if offlineMin > float64(gap.OfflineGap) {
msg := fmt.Sprintf("测点[%s]离线%f min > %d min", theme.SensorName, offlineMin, gap.OfflineGap)
log.Printf("----- > %s", msg)

Loading…
Cancel
Save