Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vindolin/geolog2mqtt


https://github.com/vindolin/geolog2mqtt

Last synced: 12 days ago
JSON representation

Awesome Lists containing this project

README

        

### GeoLog2MQTT

Tail server log, get geocoordinates with Maxminds GeoLite2 database and publish results to a MQTT broker.

```
usage: run [-h|--help] -l|--log_file "" -g|--geodb_file ""
-m|--mqtt_server "" [-p|--mqtt_port ] [-u|--username
""] [-P|--password ""] [-t|--topic ""]
[-T|--throttle_duration ]

Arguments:

-h --help Print help information
-l --log_file log file to tail
-g --geodb_file geolite db to use
-m --mqtt_server mqtt server to use
-p --mqtt_port mqtt port to use. Default: 1884
-u --username mqtt username to use
-P --password mqtt password to use
-t --topic mqtt topic to use. Default: location
-T --throttle_duration throttle in seconds. Default: 5
```

Example without credentials:

go run . -l /var/log/nginx/mysite.log -g ~/tmp/GeoLite2-City.mmdb -m localhost