Files
hiring-test-one/doc/visualisation.md

57 lines
1.4 KiB
Markdown
Raw Normal View History

2015-11-17 13:49:12 +00:00
## Goaccess
2015-11-17 15:24:28 +00:00
To get live statistics in [goaccess](http://goaccess.io/), first create this config file at `~/.goaccessrc`:
```
time-format %T
date-format %d/%b/%Y
2016-07-01 20:53:10 +01:00
log.format %h %^[%d:%t %^] "%r" %s %b "%R" "%u"
2015-11-17 15:24:28 +00:00
```
Then, start the server, outputting `combined` format logs to disk:
```sh
$ ws -f combined > web.log
```
In a separate terminal, point goaccess at `web.log` and it will display statistics in real time:
2015-11-17 15:24:28 +00:00
```
$ goaccess -p ~/.goaccessrc -f web.log
```
2015-11-17 13:49:12 +00:00
## Logstalgia
local-web-server is compatible with [logstalgia](http://code.google.com/p/logstalgia/).
### Install Logstalgia
On MacOSX, install with [homebrew](http://brew.sh):
```sh
$ brew install logstalgia
```
Alternatively, [download a release for your system from github](https://github.com/acaudwell/Logstalgia/releases/latest).
Then pipe the `logstalgia` output format directly into logstalgia for real-time visualisation:
```sh
$ ws -f logstalgia | logstalgia -
```
2017-03-23 21:42:21 +00:00
![local-web-server with logstalgia](https://raw.githubusercontent.com/lwsjs/local-web-server/master/doc/img/logstagia.gif)
2015-11-17 13:49:12 +00:00
## glTail
To use with [glTail](http://www.fudgie.org), write your log to disk using the "default" format:
```sh
$ ws -f default > web.log
```
Then specify this file in your glTail config:
```yaml
servers:
dev:
host: localhost
source: local
files: /Users/Lloyd/Documents/MySite/web.log
parser: apache
color: 0.2, 0.2, 1.0, 1.0
```