Skip to content

vindolin/geolog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

geolog

Visualize live web server access on a browser map.

image

usage: run [-h|--help] -l|--log_file "<value>" -g|--geodb_file "<value>"
           [-p|--port "<value>"] [-s|--blip_size <float>] [-b|--blip_life_time
           <integer>] [-d|--dark]

           run the geolog websocket server

Arguments:

  -h  --help            Print help information
  -l  --log_file        log file to tail
  -g  --geodb_file      geolite db to use
  -p  --port            port to listen on. Default: 8080
  -s  --blip_size       Maximum size of the blip relative to the map width. Default: 0.3
  -b  --blip_life_time  life time of the map blips (Milliseconds). Default: 2000
  -d  --dark            dark mode

Important

Geolog needs a local *.mmdb Maxmind database to lookup the geo location.

You can get a free licence to download their geoip databases at: https://dev.maxmind.com/geoip.

Geolog creates a http server from which the map is served, updates happen over websockets.

Websockets get automatically reconnected.

Run the Go program directly from github:

go run github.com/vindolin/geolog \
-l /var/log/nginx/access.log \
-g /opt/GeoLite2-City.mmdb \
-d

... or from source:

go run . \
-l /var/log/nginx/access.log \
-g /opt/GeoLite2-City.mmdb \
-p 8080

Docker

Build the container:

docker build -t vindolin/geolog \
--build-arg ACCOUNT_ID={YOUR_ACCOUNT_ID} \
--build-arg LICENSE_KEY={YOUR_ICENSE_KEY} \
.

... and run it:

light map

image

docker run -it --rm --name geolog \
-v /var/log/nginx:/var/log/nginx:ro \
-p 8080:80 \
vindolin/geolog \
-l /var/log/nginx/access.log

dark map

image

docker run -it --rm --name geolog \
-v /var/log/nginx:/var/log/nginx:ro \
-p 8080:80 \
vindolin/geolog \
-l /var/log/nginx/access.log \
-d