Garylog日志告警配置方法

2019-08-22  本文已影响0人  我是孟小鱼呀

我们知道graylog可以将收集的的日志通过web界面展示出来,但随着日志量的增加,我们可能不能及时的发现一些异常日志。为了避免这中情况出现,告警通知可以说很有必要了。本篇文章就来告诉你如何设置graylog告警通知。

1、先在graylog server 的配置文件中添加Email配置
默认graylog的配置文件在/etc/graylog/server/server.conf

vim /etc/graylog/server/server.conf

#Email transport

transport_email_enabled = true
transport_email_hostname = smtp.exmail.qq.com
transport_email_port = 465
transport_email_use_auth = true
transport_email_auth_username = you@example.com#修改成自己的名字
transport_email_auth_password = secret#设置密码
transport_email_subject_prefix = [graylog]
transport_email_from_email = graylog@example.com#修改example

2、graylog web 界面配置

(1)新建告警条件:点击“Alerts”--“Mange condition”--“Add new condition” 1.png 2.jpg (2)选择想要添加告警的stream和条件类型 3.jpg

Condition type:

(3)配置告警通知:点击“Notifications”--“Add new Notification ” 8.jpg (4)选择告警stream和通知类型 9.jpg

Notification type:

(5)测试邮件:点击Test查看收到邮件内容,配置完成。 12.jpg 12).jpg
上一篇 下一篇

猜你喜欢

热点阅读