常用表达式
常用表达式
# 字段等值
service: api
# 组合与排除
status: 500 and not env: test
# 通配与短语
message: "connection refused" and path: /v1/*
# 数值比较
duration_ms >= 1000 and duration_ms < 5000KQL 从 Kibana 7.11 起为默认;需要正则等更复杂能力时可切到 Lucene 语法。
KQL 是 Kibana 检索框里的过滤语法:字段:值、and/or/not 组合、通配与数值比较;比 Lucene 更直观,是 Discovery 默认语法。
# 字段等值
service: api
# 组合与排除
status: 500 and not env: test
# 通配与短语
message: "connection refused" and path: /v1/*
# 数值比较
duration_ms >= 1000 and duration_ms < 5000