geolog2mqtt

command module
v0.0.0-...-5561bda Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2024 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 "<value>" -g|--geodb_file "<value>"
           -m|--mqtt_server "<value>" [-p|--mqtt_port <integer>] [-u|--username
           "<value>"] [-P|--password "<value>"] [-t|--topic "<value>"]
           [-T|--throttle_duration <integer>]

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址