Get the App
SLTechnology News&Howtos  ›  Servers  › 

Zabbix Monitoring Log

Shulou Source: shulou.com Published: 2022-06-02 01:56:31 11月17日 Update

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 | (?

Tags: Character monitor key keyword string log expression question affirmation content function just direction example trigger project combination powerful abbreviated that is Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Docker OPPO Reno NVidia Apple