Skip to main content
Version: Next

create_geoip

Creates a GeoIP context.

context::create_geoip name:string, [db_path=string]

Description

The context::create_geoip operator constructs a new context of type GeoIP.

You must either provide a database with the db_path argument or use context::load to populate the context after creation.

You can also create a GeoIP context as code by adding it to tenzir.contexts in your tenzir.yaml:

<prefix>/etc/tenzir/tenzir.yaml
tenzir:
  contexts:
    my-geoips:
      type: geoip
      arguments:
        db-path: /usr/local/share/stuff/high-res-geoips.mmdb

Making changes to arguments of an already created context has no effect.

name: string

The name of the new GeoIP context.

db_path = string (optional)

The path to the MMDB database, relative to the node's working directory.

Examples

Create a new GeoIP context

context::create_geoip "ctx", db_path="GeoLite2-City.mmdb"

Populate a GeoIP context from a remote location

Load CIRCL's Geo Open dataset from November 12, 2024:

load_http "https://data.public.lu/fr/datasets/r/69064b5d-bf46-4244-b752-2096b16917a4"
context::load "ctx"

See Also

context::create_lookup_table, context::create_bloom_filter, context::enrich, context::erase, context::inspect, context::list, context::load, context::remove, context::reset, context::save, context::update,