telegraf-geoip

module
v0.0.0-...-146ea74 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: MIT

README

Telegraf GeoIP processor plugin

This processor plugin for telegraf looks up IP addresses in the MaxMind GeoLite2 database and adds the respective ISO country code, city name, latitude and longitude as new fields to the output.

Installation

This module is to be used as an external plugin to telegraf, therefore first compile it using Go:

$ git clone https://github.com/a-bali/telegraf-geoip
$ cd telegraf-geoip
$ go build -o geoip cmd/main.go

This will create a standalone binary named geoip.

Usage

You will need to add this plugin as an external plugin to your telegraf config as follows:

[[processors.execd]]
command = ["/path/to/geoip_binary", "--config", "/path/to/geoip_config_file"]

Configuration

As specified above, the plugin uses a separate configuration file, where you can specify where it can find the downloaded GeoLite2 database (you will need the City version), which field to read as input and how to name the newly created fields. For details, please see the sample config.

License

This software is licensed under the MIT license.

Directories

Path Synopsis
plugins

Jump to

Keyboard shortcuts

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