日志集群分析器:hblog

xg48 9年前發布 | 13K 次閱讀 hblog 日志處理

hblog 是一個日志集群分析器。支持的體制格式有:Syslog、 Log4j、Java GC log。

Usage: hblog [OPTIONS]... [TIER...] [TIER:HOST...]

  Where TIER is one of:

  dfs-nn                     hbase-master-gc            mr-jt
  dfs-nn-gc                  hbase-regionservers        mr-jt-gc
  dfs-slaves                 hbase-regionservers-gc     mr-slaves
  dfs-slaves-gc              hbase-secondary            mr-slaves-gc
  dfs-sn                     hbase-secondary-gc         syslog
  dfs-sn-gc                  hbase-thrift
  hbase-master               hbase-zookeepers

hblog - a log paser for clusters

Options:
  -h, --help            show this help message and exit
  -v, --verbose         print extra information about the state of hblog
  -n, --nowrap          print characters only up to the width of your terminal

  Modes:
    Log lines are "fingerprinted", usually able to assign matching
    fingerprints to log lines that differ only by timestamp, specific host
    names, or other variables.

    --summary           host-vs-fingerprint frequency table (Default mode)
    -d, --details       print all matching log lines embellished with
                        hostnames and fingerprints
    -f, --follow        like --details but streaming, just like 'tail -f'

  Select time:
    If time selectors are not supplied, only the last one minute of logs
    will be processed.

    -s START, --start=START
                        process only lines after the time specified
                        in format YYYY-MM-DD hh:mm:ss
    -e END, --end=END   process only lines up to the time specified
                        in format YYYY-MM-DD hh:mm:ss
    -t TAIL, --tail=TAIL
                        process only the last X minutes of each log specified
                        as one of these formats ":sec", "min", "hour:min"
    -T TAIL_END, --tail-end=TAIL_END
                        process only up to the last X minutes of each log
                        specified as one of these formats ":sec", "min",
                        "hour:min"

  Filters:
    -l LEVEL, --level=LEVEL
                        the log level to filter for (default level: WARN)
    -S SAMPLE, --sample=SAMPLE
                        sampling rate will be achieved by skipping log lines
                        (default: 1.0, read all lines)
    -p FP, --fp=FP      comma-separated list of fingerprints to include
    -P FP_EXCLUDE, --fp-exclude=FP_EXCLUDE
                        comma-separated list of fingerprints to exclude
    -r RE, --re=RE      comma-separated list of regex to include (case
                        insensitive)
    -R RE_EXCLUDE, --re-exclude=RE_EXCLUDE
                        comma-separated list of regex to exclude (case
                        insensitive)
    --local             To test hblog. Connect to localhost. Read logs from
                        ./var/log/hadoop-example.log

具有以下功能:

  • Remote access to logs via a single CLI

  • Multi-host summaries of log line frequencies

  • Multi-host realtime tailing (like tail -f)

項目主頁:http://www.baiduhome.net/lib/view/home/1428676487187

 本文由用戶 xg48 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!