Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ysugimoto committed Jun 10, 2016
1 parent a01dfce commit 05f9bee
Showing 1 changed file with 48 additions and 26 deletions.
74 changes: 48 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
## Tailor
# Tailor

Tailor is a simple log tailing, summarize tool, supplied by single binary for `MoxOS` and `Linux`. Download latest binary from [releases](https://github.com/ysugimoto/tailor/releases).
`Tailor` is a simple log tailing, summarize tool.

## Basic
## Installation

This product supplied by single binary for `MacOS` and `Linux`. Download latest binary from [releases](https://github.com/ysugimoto/tailor/releases).

## Basic Usage

Put a binary on your `PATH` directory.

Expand All @@ -16,7 +20,7 @@ $ tailor [options] [,file]
$ tailor [file]
```

It works like `tail` command.
It works like `tail -f` command.

### Tailing from stdin

Expand All @@ -28,42 +32,34 @@ It works continous tailing command output.

## Transporting

`tailor` can tarnsport tailing data over the network. It will useful for correct same logs from multiple machine's, e.g. docker containers.
`tailor` can tarnsport data over the network like `fluendtd` . It will useful for correct same logs from multiple machine's, e.g. docker containers, Web servers under the load balancing.
Transport some data from CLI, and realtime watch these data on Web UI.

### Central server

First, Execute central-server process at external server that enable to access by browser, (for example, example.com)
First, execute central-server process at external server that enable to access by browser, (sample is `example.com`)

```
$ tailor -C
$ tailor -C [-d]
```

If you want to run with daemon, add `-d` option:

```
$ tailor -C -d
```
If you want to run with daemon, add `-d` option.

And, tailor supply the Web Interface at http://example.com:9000 (enable to change listen port number with `-p` option), access `http://examole.com:9000` on browser.
Central server accepts data on HTTP interface, in this sample case, endpoint is `http://example.com:9000/remote`. then, send data from any client support HTTP interface, `curl`, `XMLHttpRequest`, and so on.
`tailor` supply the Web Interface at http://example.com:9000 (enable to change listen host/port number with `-h`/`-p` option), access `http://examole.com:9000` on browser.
Central server accepts data on HTTP interface with CORS. In this sample case, endpoint is `http://example.com:9000/remote`. then, send data from any client support HTTP interface, `curl`, `XMLHttpRequest`, etc....

### Tailing server
### Tailing server(s)

Second, Execute tail data and transporting process at web servers you want to watch:

```
$ tailor -P http://example.com:9000 /var/log/httpd/access_log
$ tailor [-d] -P http://example.com:9000 /var/log/httpd/access_log
```

If you want to run with daemon, add `-d` option:

```
$ tailor -d -P http://example.com:9000 /var/log/httpd/access_log
```
If you want to run with daemon, add `-d` option.

`-P` option's value is a central server's host:port. Then, tailing data will transport to central server, and can watch Web Interface.


### Stopping server

If you stop the daemon, execute with `--kill` option:
Expand All @@ -72,7 +68,17 @@ If you stop the daemon, execute with `--kill` option:
$ tailor --kill
```

## Options
## Web UI

Central server supply GUI on browser, updating realtime logs by WebSocket.
You can see logs that classified by host, one, two, four splitted panes.

## Note

- Currently we support transport interface only **HTTP** , not support **HTTPS**. So that, central/transporting server recommend to be an appropriate settings, with Firewall.
- Transported data does not save anywhere, watiching only.

## Command Options

| option | description | default |
|-----------------|--------------------------------------------------------------|-----------|
Expand All @@ -81,8 +87,24 @@ $ tailor --kill
| -C, --central | Run with centran server mode. | - |
| -t, --transport | Run with tansport mode. Determine central server's full URI. | - |
| -d, --daemon | Run with daemon. | - |
| -c, --client | Run with daemon. | - |
| -h, --help | Show the help. | - |
| --kill | Kill the daemon process. | - |
| -c, --client | Run with client mode. | - |
| -k, --kill | Kill the daemon process. | - |
| --help | Show command help. | - |
| --stdin | Tailing from stdin data. | - |

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

## License

MIT License

## Author

Yoshiaki Sugimoto

0 comments on commit 05f9bee

Please sign in to comment.