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 monitors logs

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

In zabbix comes with the function of monitoring the log, you can get key fields, do not have to write scripts to monitor the log keywords, the following is zabbix comes with the log monitoring key value, see the product manual for details.

The above is to monitor the log file zabbix comes with the key, how to see the details. Take logrt for example.

The above configuration is to obtain the "Get taskId error" field in the aim.log log file. aim.log is a rotation training log, and rotation training will be performed every 11M.

'''

Type: When monitoring log files, be sure to select "zabbix client (active)"

Key value: configured according to product manual

Message type: Message type to select "Log"

Update interval: self-defined

'''

"""Configure triggers"""

"""

Expression: Select the corresponding monitoring item, logrt[/home/aim/apache-tomcat/logs/aim.log,Get taskId error,,skip,,]

The content in this key value is, log absolute path, keyword, skip is to skip the old content, only monitor the newly generated log, the rest are not written with "," separated

nodata(10m) This function is no data in 10 minutes 1:true 0:false. Therefore, if the keyword "Get taskId error" is obtained, the nodata function value will become false, triggering the trigger to achieve the purpose of monitoring.

"""

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