日志集群分析器:hblog

xg48 9年前

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.open-open.com/lib/view/home/1428676487187