用于分析日志文件并在增长过快时发出警报的工具?

用于分析日志文件并在增长过快时发出警报的工具?

我正在寻找一种可以分析日志文件并在文件在 1 分钟内获得 10 个条目时发送通知的工具。此外,它还需要提供一种方法来检查文件大小是否比一周前增长得更快。

有人知道这样的工具吗?还是我必须自己写一个?

答案1

logwatch可以配置日志文件来做很多事情:

trusty (8) logwatch.8.gz
Provided by: logwatch_7.4.0+svn20130529rev144-1ubuntu1_all 

NAME
       logwatch - system log analyzer and reporter

SYNOPSIS
       logwatch  [--detail  level  ]  [--logfile  log-file-group  ] [--service
       service-name ]  [--mailto  address  ]  [--archives]  [--range  range  ]
       [--debug   level  ]  [--filename  file-name  ]  [--logdir  directory  ]
       [--hostlimit hosts ] [--hostname  hostname  ]  [--html_wrap  number  of
       characters ] [--hostformat host based options ] [--output output-type ]
       [--format report format ]  [--encode  encoding  to  use  ]  [--numeric]
       [--version] [--help|--usage]

DESCRIPTION
       Logwatch  is  a customizable, pluggable log-monitoring system.  It will
       go through your logs for a given period of time and make  a  report  in
       the  areas  that  you  wish with the detail that you wish.  Logwatch is
       being used for Linux and many types of UNIX.

相关内容