如果过去 10 分钟内发生错误,我正在使用 ElastAlert 通知我的消费者。我想发送发生的错误列表。但是,如果 errorCode 中存在连字符 ('-'),则列表中的项目会一分为二
这是我想要的结果
errorCode:
error1: 10
error-place-2: 15
error-new-place-3: 20
这是我得到的结果
erorrCode:
error1: 10
error: 35
place: 35
2: 15
new: 20
3: 20
有没有办法得到想要的结果?
更新 - 添加索引映射的结果
{
"indexdate":{
"mappings":{
"app_log":{
"properties":{
},
"transaction_log":{
"properties":{
"@timestamp":{
"type":"date",
"format":"strict_date_optional_time||epoch_millis"
},
"other":{
},
"errorCode":{
"type":"string"
},
"other":{
},
}
}
}
}
}