Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1263 from mozilla-services/geoip_not_included
Browse files Browse the repository at this point in the history
Update docs to reflect geoip decoder not included in the binaries.
  • Loading branch information
rafrombrc committed Jan 6, 2015
2 parents 8a4a6ed + 3e3544d commit 0bf421a
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
0.8.2 (2015-01-05)
0.8.2 (2015-01-06)
==================

Bug Handling
Expand Down
41 changes: 30 additions & 11 deletions docs/source/config/decoders/geoip_decoder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,45 @@ GeoIpDecoder

.. versionadded:: 0.6

Decoder plugin that generates GeoIP data based on the IP address of a specified field. It uses the Go project: https://github.com/abh/geoip as a wrapper around MaxMind's geoip-api-c library.
This decoder assumes you have downloaded and installed the `geoip-api-c <https://github.com/maxmind/geoip-api-c/releases/>`_ library from MaxMind's website.
Currently, only the GeoLiteCity database is supported, which you must also download and install yourself into a location to be referenced by the db_file config option.
By default the database file is opened using "GEOIP_MEMORY_CACHE" mode. This setting is hard-coded into the wrapper's geoip.go file. You will need to manually override that code
if you want to specify one of the other modes listed `here: <https://github.com/maxmind/geoip-api-c/blob/master/README.md#memory-caching-and-other-options/>`_
Decoder plugin that generates GeoIP data based on the IP address of a
specified field. It uses the `GeoIP Go project
<https://github.com/abh/geoip>`_ as a wrapper around MaxMind's `geoip-api-c
library <https://github.com/maxmind/geoip-api-c/releases/>`_, and thus assumes
you have the library downloaded and installed. Currently, only the GeoLiteCity
database is supported, which you must also download and install yourself into
a location to be referenced by the db_file config option. By default the
database file is opened using "GEOIP_MEMORY_CACHE" mode. This setting is hard-
coded into the wrapper's geoip.go file. You will need to manually override
that code if you want to specify one of the other modes listed `here
<https://github.com/maxmind/geoip- api-c/blob/master/README.md #memory-
caching- and-other-options/>`_.

.. note::
If you are using this with the ES output you will likely need to specify the raw_bytes_field option for the target_field specified. This is required to preserve the formatting of the JSON object.
Due to external dependencies, this plugin is not compiled in to the
released Heka binaries. It will automatically be included in a
:ref:`source build <from_source>` if GeoIP.h is available in the include
path during build time. The generated binary will then only work on
machines with the appropriate GeoIP shared library (e.g. `libGeoIP.so.1`)
installed.

.. note::
If you are using this with the ES output you will likely need to specify
the raw_bytes_field option for the target_field specified. This is
required to preserve the formatting of the JSON object.

Config:

- db_file:
The location of the GeoLiteCity.dat database. Defaults to "/var/cache/hekad/GeoLiteCity.dat"
The location of the GeoLiteCity.dat database. Defaults to
"/var/cache/hekad/GeoLiteCity.dat"

- source_ip_field:
The name of the field containing the IP address you want to derive the location for.
The name of the field containing the IP address you want to derive the
location for.

- target_field:
The name of the new field created by the decoder. The decoder will output a JSON object with the following elements:
- target_field:
The name of the new field created by the decoder. The decoder will output
a JSON object with the following elements:

- latitute: string,
- longitude: string,
Expand All @@ -45,4 +65,3 @@ Config:
db_file="/etc/geoip/GeoLiteCity.dat"
source_ip_field="remote_host"
target_field="geoip"

0 comments on commit 0bf421a

Please sign in to comment.