mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-11-29 18:27:58 +08:00
[FIX] add recover to event log when monite prometheus get msg error
This commit is contained in:
parent
87ca1b0397
commit
5aa5eed6b5
@ -113,6 +113,11 @@ var rex *regexp.Regexp
|
||||
|
||||
//Format 格式化处理监控数据
|
||||
func Format(source map[string]gjson.Result) map[string]interface{} {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
logrus.Warnf("error deal with source msg %v",source)
|
||||
}
|
||||
}()
|
||||
if rex == nil {
|
||||
var err error
|
||||
rex, err = regexp.Compile(`\d+\.\d{3,}`)
|
||||
|
Loading…
Reference in New Issue
Block a user