|
@ -148,7 +148,7 @@ func (the *consumerSavoirTheme) judgeOffline() { |
|
|
log.Printf("s:%d,f:%d,sensor:%d 采集时间%s 当前时间%s", gap.StructId, gap.FactorId, theme.Sensor, theme.CreateTime, now) |
|
|
log.Printf("s:%d,f:%d,sensor:%d 采集时间%s 当前时间%s", gap.StructId, gap.FactorId, theme.Sensor, theme.CreateTime, now) |
|
|
|
|
|
|
|
|
//拿到当前es最后一条数据和当前数据库的配置之后去查是否产生告警
|
|
|
//拿到当前es最后一条数据和当前数据库的配置之后去查是否产生告警
|
|
|
StrValue := "80040003" |
|
|
StrValue := "8004" |
|
|
alarmQueryStr := the.getEsAlarmValueStr(gap.StructId, StrValue) |
|
|
alarmQueryStr := the.getEsAlarmValueStr(gap.StructId, StrValue) |
|
|
allAlarmThemes, err := the.OutEs.SearchAlarmThemeData(the.Info.IoConfig.Out.Es.AlarmIndex, alarmQueryStr) |
|
|
allAlarmThemes, err := the.OutEs.SearchAlarmThemeData(the.Info.IoConfig.Out.Es.AlarmIndex, alarmQueryStr) |
|
|
log.Printf("allAlarmThemes----- > %s", allAlarmThemes) |
|
|
log.Printf("allAlarmThemes----- > %s", allAlarmThemes) |
|
@ -245,7 +245,7 @@ func (the *consumerSavoirTheme) getEsAlarmValueStr(structId int, alarmCode strin |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
"term": { |
|
|
"term": { |
|
|
"alarm_code": { |
|
|
"alarm_type_code": { |
|
|
"value": %s |
|
|
"value": %s |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|