Graylog日志告警
//
# Graylog日志告警
3.1 Alert官方文档 (opens new window)
# 配置Notifications
- 创建Notifications
# Notification-URL
版本:python2
#centos7:yum install -y python-pip
pip install --upgrade pip==19.3.1
pip install pip install flask requests
nohup python graylog_alert_interface.py & #监听端口:7777
1
2
3
4
5
6
2
3
4
5
6
# 配置Event Definitions
- 创建Event
- Event Details
- Filter Aggregation
Filter示例
Fields 不做配置
Notifications
点击 【Add Notifications】选择前面配置的 Notifications
- Summary
# 测试消息发送
- 写入测试日志
- 企业微信消息通知接收
# 邮件告警
- 邮件报警
--- [ 日志报警 ] ---------------------------
报警类型: ${event_definition_title}
报警描述: ${event_definition_description}
报警表达式: ${event.message}
Fields:
${foreach event.fields field} ${field.key}: ${field.value}
${end}
${if backlog}
--- [ 详细日志 ] ------------------------------------
Last messages accounting for this alert:
${foreach backlog message}
${message}
${end}
${end}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 个人存储下载地址。。。
graylog_alert_interface.py
graylog-server-3.1.2-1.noarch.rpm
nxlog-ce-2.10.2150-1_rhel7.x86_64.rpm
1
2
3
4
2
3
4
//
如果此文章对您有帮助,点击 -->> 请博主喝咖啡 (opens new window)
上次更新: 2023/11/20, 16:52:10