夜莺-Nightingale
夜莺V7
项目介绍 功能概览
部署升级 部署升级
数据接入 数据接入
告警管理 告警管理
数据查看 数据查看
功能介绍 功能介绍
API FAQ
夜莺V6
项目介绍 架构介绍
快速开始 快速开始
黄埔营
安装部署 安装部署
升级
采集器 采集器
使用手册 使用手册
API API
数据库表结构 数据库表结构
FAQ FAQ
开源生态
Prometheus
版权声明
第1章:天降奇兵 第1章:天降奇兵
第2章:探索PromQL 第2章:探索PromQL
第3章:Prometheus告警处理 第3章:Prometheus告警处理
第4章:Exporter详解 第4章:Exporter详解
第5章:数据与可视化 第5章:数据与可视化
第6章:集群与高可用 第6章:集群与高可用
第7章:Prometheus服务发现 第7章:Prometheus服务发现
第8章:监控Kubernetes 第8章:监控Kubernetes
第9章:Prometheus Operator 第9章:Prometheus Operator
参考资料

ES Log Alert

ES log alerting allows you to detect abnormal logs through log query analysis and trigger alerts accordingly.

First, select the ES data source, then configure query conditions and alert conditions. Below is a detailed explanation of each numbered function:

1 Select Index

Supports multiple configuration methods:

  1. Specify a single index: gb - search all documents in the gb index
  2. Specify multiple indices: gb,us - search all documents in both gb and us indices
  3. Specify index prefix: g*,u* - search all documents in any indices starting with g or u

2 Set Filter Conditions

Currently supports query string syntax. For detailed syntax, refer to ES Documentation

3 Set Log Fields

Click to select the date field in the logs

4 Set Log Query Time Range

For example, 5 minutes means the alert query will search logs from the past 5 minutes

5 Value Extraction

Statistical analysis functions for logs, such as count, sum, avg, min, max, etc.

6 Group By

Group logs by fields, for example, grouping by host field for count statistics. Results will be grouped by the host field

7 Alert Conditions

Statistical analysis values are assigned to variables A, B, C, etc. in the alert conditions, then alert judgments are made based on these variables. For example, $A > 10 means trigger an alert when log count exceeds 10

8 Advanced Configuration

In some scenarios where logs are delayed (e.g., 3 minutes delay), querying the last 3 minutes may return no data. In such cases, you can set a delay query time in advanced configuration. For example, setting a 180s delay means the end time for queries will be set to current time minus 180s

Usage Examples

Example 1: Alert Conditions for HTTP CODE 4xx

Description: Within every 10-minute period, check the message field in logs. If 4xx logs exceed 2 times, trigger an alert, with statistics grouped by host.hostname field. Configuration shown below:

ES Log Alert

Example 2: Alert When API Response Time Exceeds 1 Second

Description: Group statistics by http_method to monitor request interface response times exceeding 1 second. Configuration shown below:

ES Log Alert

Example 3: Alert When request_time Exceeds 1900ms and Matching Logs Exceed 10

Description: Within every 2-minute period, filter logs where request_time exceeds 1900ms. Group by request_uri dimension and check if log count exceeds 10. Configuration shown below:

ES Log Alert

After configuring the required data fields, you can use the data preview button to preview query results.

ES Log Alert

快猫星云 联系方式 快猫星云 联系方式
快猫星云 联系方式
快猫星云 联系方式
快猫星云 联系方式
快猫星云
OpenSource
开源版
Flashcat
Flashcat