整体查询条件
{
"query": {
"bool": {
"must": [
{
"range": {
"attack_time": {
"from": "2023-02-07 16:00:00",
"to": "2023-02-07 16:00:03",
"include_lower": true,
"include_upper": true,
"boost": 1
}
}
},
{
"bool": {
"must": [
{
"bool": {
"should": [
{
"bool": {
"must": [
{
"bool": {
"should": [
{
"wildcard": {
"alarm_level": {
"wildcard": "*高*",
"boost": 1
}
}
},
{
"wildcard": {
"alarm_level": {
"wildcard": "*低*",
"boost": 1
}
}
}
],
"adjust_pure_negative": true,
"boost": 1
}

该文描述了一个针对Elasticsearch的复杂查询构建过程,涉及时间范围、字段过滤、布尔逻辑和脚本查询。查询用于匹配特定时间内的告警事件,根据告警级别、日志格式类型和告警ID进行筛选。同时,排除在特定时间段内发生的事件。最后,对匹配到的记录进行更新操作,关联告警项目信息。
最低0.47元/天 解锁文章
3万+

被折叠的 条评论
为什么被折叠?



