8000 Merge pull request #113 from urso/doc/geoip · packplusplus/libbeat@e5043b5 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Sep 14, 2023. It is now read-only.

Commit e5043b5

Browse files
committed
Merge pull request #113 from urso/doc/geoip
add geoip config parameters to configuration doc
2 parents a5d8eff + 47a73bd commit e5043b5

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

common/geolite.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ type Geoip struct {
1616
func LoadGeoIPData(config Geoip) *libgeo.GeoIP {
1717

1818
geoip_paths := []string{
19-
"/usr/share/GeoIP/GeoIP.dat",
20-
"/usr/local/var/GeoIP/GeoIP.dat",
19+
"/usr/share/GeoIP/GeoLiteCity.dat",
20+
"/usr/local/var/GeoIP/GeoLiteCity.dat",
2121
}
2222
if config.Paths != nil {
2323
geoip_paths = *config.Paths

docs/configuration.asciidoc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ shipper:
4242
# All the IPs will be deleted afterwards. Note, that the value must be higher than
4343
# refresh_topology_freq. The default is 15 seconds.
4444
topology_expire: 15
45+
46+
# Configure local GeoIP database support. If no path configured
47+
# the locations /usr/share/GeoIP/GeoLiteCity.dat and
48+
# /usr/local/var/GeoIP/GeoLiteCity.dat are searched for a GeoIP database.
49+
geoip:
50+
# If paths is empty, GeoIP support will be disabled.
51+
paths: ["/path/to/geoip/data/GeoLiteCity.dat"]
4552
------------------------------------------------------------------------------
4653

4754
==== Options
@@ -126,6 +133,14 @@ useful in case a shipper stops publishing its IP addresses. The IP addresses
126133
are removed automatically from the topology map after expiration. The default
127134
is 15 seconds.
128135

136+
===== geoip.paths
137+
138+
The geoip.paths setting configures the search path for the GeoIP databases. If no database can be loaded or geoip.paths is an empty list, GeoIP support is disabled. The first file found will be loaded.
139+
140+
If geoip.paths is missing from config file the default paths /usr/share/GeoIP/GeoLiteCity.dat and /usr/local/var/GeoIP/GeoLiteCity.dat are searched for installed GeopIP databases.
141+
142+
*Important*: For GeoIP support to function correctly the [GeoLite City database](https://dev.maxmind.com/geoip/legacy/geolite/) is required.
143+
129144

130145
[[configuration-output]]
131146
=== Outputs

0 commit comments

Comments
 (0)
0