Skip to content

Commit

Permalink
add logtail usage
Browse files Browse the repository at this point in the history
  • Loading branch information
arstercz committed Apr 7, 2019
1 parent 30bbaca commit 5f59931
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bin/sys-google-totp
bin/sys-ipton
bin/sys-kill-close-wait
bin/sys-lock-run
bin/sys-log-syslog
bin/sys-logtail
bin/sys-memory-maps
bin/sys-mem-redis-summary
bin/sys-memcached-check
Expand Down
21 changes: 9 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1549,26 +1549,23 @@ All the check are based on [Broadcom's](https://www.broadcom.com/) `MegaCli` com

[Back to TOC](#table-of-contents)

sys-log-syslog
sys-log-tail
==============

`type: shell`

extra the log file from last checkpoint and send needed level message to syslog server.
Read the log file from last checkpoint, it's useful when analsis log file with a incrementally way.

### Usage
```
# send the redis log which regexp the ' # ' lines to the syslog message.
# ./sys-log-syslog -f /opt/redis4.0/log/redis.log -t redis6381 -r '\s+#\s+' -d
2018_05_10_18_02_11 [info] logger send ok
# ./sys-log-syslog -f /opt/redis4.0/log/redis.log -t redis6381 -r '\s+#\s+' -d
2018_05_10_18_02_13 [warn] redis log no change
$ echo 1 >/tmp/t.log
$ wt-logtail -f /tmp/t.log
1
$ echo 2 >>/tmp/t.log
$ wt-logtail -f /tmp/t.log
2
```

*note*: you can not use -s option if your system's logger command does not support -n option. and the -r option shuld be use Perl regular expression.

use --help option to read more.
use `--help` option for more usage message.

[Back to TOC](#table-of-contents)

Expand Down

0 comments on commit 5f59931

Please sign in to comment.