项目作者: sudofox

项目描述 :
cPanel chkservd.log analysis tool
高级语言: PHP
项目地址: git://github.com/sudofox/chkservdReport.git
创建时间: 2018-09-28T15:17:24Z
项目社区:https://github.com/sudofox/chkservdReport

开源协议:MIT License

下载


Tailwatch Log Analysis Tool

(currently chkservdReport.sh)

cPanel’s Tailwatch produces a strange log with details about service checks, formatted in an almost unreadable manner.
My goal for this project is to have a tool that can parse through the log and produce a human-readable report of when services went down, how long they were down for, what it took to get them running again, and so forth.

Usage:

  1. Usage: ./chkservdReport.sh -f<filename> [<additional arguments>]
  2. If you wish to pass the arguments in any order, you must omit the space after the flag letter.
  3. (e.g. -fchkservd.log -m500M -n100000)
  4. By default, -n is set to 10000 (this will go back several days).
  5. Required arguments
  6. -f filename of chkservd logfile
  7. Optional arguments
  8. -n number of lines to read from the end of the file (default 10000, pass 0 for unlimited)
  9. -m manually set the memory_limit - be careful with this! ( e.g. -m128M )
  10. Verbosity and visual options (these are optional arguments)
  11. -vt Show timeline event explanations
  12. -vp Show when we reach each step in script execution.
  13. -vc Colorize output regardless of whether it is entering a pipe to a file/second program or not.

Screenshots:

Normal output for parsing a log file:

Normal output for parsing a log file

Example of timeline event explanations:

Example of timeline event explanations

To Do:

  • Add timeline entry for large gaps between log entries (e.g. if chkservd is disabled or something)
  • Check/test with new chkservd format to see if things are still working properly