diff --git a/consumers/consumerSavoirTheme.go b/consumers/consumerSavoirTheme.go index aed9e1c..8782bae 100644 --- a/consumers/consumerSavoirTheme.go +++ b/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)