Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vindolin/geolog
Visualize web server access on a browser map
https://github.com/vindolin/geolog
geoip golang map monitoring
Last synced: 12 days ago
JSON representation
Visualize web server access on a browser map
- Host: GitHub
- URL: https://github.com/vindolin/geolog
- Owner: vindolin
- License: mit
- Created: 2024-02-23T14:33:36.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-08-13T10:18:11.000Z (5 months ago)
- Last Synced: 2024-11-11T10:51:04.238Z (about 2 months ago)
- Topics: geoip, golang, map, monitoring
- Language: Go
- Homepage:
- Size: 2.76 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# geolog
## Visualize live web server access on a browser map.![image](https://raw.githubusercontent.com/vindolin/geolog/main/screencast.webp)
```shell
usage: run [-h|--help] -l|--log_file "" -g|--geodb_file ""
[-p|--port ""] [-s|--blip_size ] [-b|--blip_life_time
] [-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:
```shell
go run github.com/vindolin/geolog \
-l /var/log/nginx/access.log \
-g /opt/GeoLite2-City.mmdb \
-d
```### ... or from source:
```shell
go run . \
-l /var/log/nginx/access.log \
-g /opt/GeoLite2-City.mmdb \
-p 8080
```## Docker
### Build the container:
```shell
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](https://raw.githubusercontent.com/vindolin/geolog/main/light.png)```shell
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](https://raw.githubusercontent.com/vindolin/geolog/main/dark.png)```shell
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
```