Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Zabbix Monitoring Log

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Example 1 of Zabbix monitoring log:

Monitoring project

Key value setting:

Log [/ data/canal/logs/job-xxx-xxx/job-xxx-xxx.log, "caused | Exception | DRROR", skip,] yyyy-MM-dd hh:mm:SS

The content in this key value is, log absolute path, keyword, skip is to skip the old content, only monitor the newly generated logs, other unwritten ones are separated by ","

Trigger: problem expression: {aws-bigdata-canal-49-63:log [/ data/canal/logs/job-xxx-xxx/job-xxx-xxx.log, "caused | Exception | DRROR", skip,] .nodata (10s)} = 0 restore expression: {aws-bigdata-canal-49-63:log [/ data/canal/logs/job-xxx-xxx/job-xxx-xxx.log, "caused | Exception | DRROR", skip,] .nodata (2m)} = 1

Nodata (2m) this function has no data 1:true 0:false in 2 minutes. So if you get the keyword "caused | Exception | DRROR", the value of the nodata function will become false, which will trigger the trigger to achieve the purpose of monitoring!

# # example 2:

In ​, we usually monitor some keywords and report errors directly, but there are often requirements that keywords and some strings can be combined with no problem, even if there are keywords such as error exception and so on, we need to use powerful rules.

Monitoring projects:

Log [/ var/log/test_file.log, "Error | (?

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report