docker: switch to IPinfo database by default

This is useful as it is CC-BY-SA 4.0 licensed and it is OK to share my access token.

Fix #455
This commit is contained in:
Vincent Bernat
2023-08-05 17:38:21 +02:00
parent a9075d894b
commit b2bec3506c
8 changed files with 39 additions and 23 deletions

5
.env
View File

@@ -1,4 +1,7 @@
COMPOSE_PROJECT_NAME=akvorado
COMPOSE_FILE=docker-compose.yml:docker-compose-demo.yml
COMPOSE_FILE=docker-compose.yml:docker-compose-ipinfo.yml:docker-compose-demo.yml
# When using MaxmindDB:
# COMPOSE_FILE=docker-compose.yml:docker-compose-maxmind.yml:docker-compose-demo.yml
# GEOIPUPDATE_ACCOUNT_ID=...
# GEOIPUPDATE_LICENSE_KEY=...

View File

@@ -3,10 +3,14 @@ kafka:
compression-codec: zstd
geoip:
optional: true
# When running on Docker, these paths are inside the container.
# Check docker-compose.yml for details.
asn-database: /usr/share/GeoIP/GeoLite2-ASN.mmdb
geo-database: /usr/share/GeoIP/GeoLite2-Country.mmdb
# When running on Docker, these paths are inside the container. By default,
# IPinfo databases are used. (https://ipinfo.io/)
asn-database: /usr/share/GeoIP/country_asn.mmdb
geo-database: /usr/share/GeoIP/country_asn.mmdb
# If you want to use MaxmindDB, check `.env`, `docker-compose-maxmind.yml` and
# update these paths:
#asn-database: /usr/share/GeoIP/GeoLite2-ASN.mmdb
#geo-database: /usr/share/GeoIP/GeoLite2-Country.mmdb
metadata:
workers: 10
provider:

View File

@@ -2,8 +2,8 @@
*Akvorado*[^name] receives flows (currently Netflow/IPFIX and sFlow), enriches
them with interface names (using SNMP), geo information (using
MaxMind), and exports them to Kafka, then ClickHouse. It also exposes
a web interface to browse the result.
[IPinfo](https://ipinfo.io/) or MaxMind), and exports them to Kafka, then
ClickHouse. It also exposes a web interface to browse the result.
[^name]: [Akvorado][] means "water wheel" in Esperanto.
@@ -51,10 +51,6 @@ You can get all the expanded configuration (with default values) with
`docker-compose exec akvorado-orchestrator akvorado orchestrator
--check --dump /etc/akvorado/akvorado.yaml`.
Take a look at the `docker-compose.yml` file if you want to setup the
GeoIP database. It requires two environment variables to fetch them
from [MaxMind](https://dev.maxmind.com/geoip/geolite2-free-geolocation-data).
Once you are ready, you can run everything in the background with
`docker-compose up -d`.

View File

@@ -19,6 +19,8 @@ identified with a specific icon:
- 💥 *inlet*: `inlet``metadata``provider(snmp)``ports` is now a map from
exporter subnets to ports, instead of a map from agent subnets to ports. This
is aligned with how `communities` and `security-parameters` options behave.
-*inlet*: support for [IPinfo](https://ipinfo.io/) geo IP database and use
it by default
-*inlet*: metadata retrieval is now pluggable. In addition to SNMP, it is
now possible to set exporter names, interface names and descriptions directly
in the configuration file. See `inlet``metadata`.

View File

@@ -1,6 +1,5 @@
---
version: "3"
services:
akvorado-exporter0: &exporter
image: ghcr.io/akvorado/akvorado:latest

10
docker-compose-ipinfo.yml Normal file
View File

@@ -0,0 +1,10 @@
---
version: "3"
services:
geoip:
image: ipinfo/ipinfo-db:latest
environment:
- IPINFO_TOKEN=a2632ea59736c7
- UPDATE_FREQUENCY=48h
volumes:
- akvorado-geoip:/data

View File

@@ -0,0 +1,13 @@
---
version: "3"
services:
geoip:
# Put GEOIPUPDATE_ACCOUNT_ID and GEOIPUPDATE_LICENSE_KEY values in `.env` file.
image: maxmindinc/geoipupdate:v4
environment:
- GEOIPUPDATE_ACCOUNT_ID
- GEOIPUPDATE_LICENSE_KEY
- GEOIPUPDATE_EDITION_IDS=GeoLite2-ASN GeoLite2-Country
- GEOIPUPDATE_FREQUENCY=48
volumes:
- akvorado-geoip:/usr/share/GeoIP

View File

@@ -10,17 +10,6 @@ volumes:
akvorado-console-db:
services:
geoip:
# Put GEOIPUPDATE_ACCOUNT_ID and GEOIPUPDATE_LICENSE_KEY values in `.env` file.
image: maxmindinc/geoipupdate:v4
environment:
- GEOIPUPDATE_ACCOUNT_ID
- GEOIPUPDATE_LICENSE_KEY
- GEOIPUPDATE_EDITION_IDS=GeoLite2-ASN GeoLite2-Country
- GEOIPUPDATE_FREQUENCY=48
volumes:
- akvorado-geoip:/usr/share/GeoIP
zookeeper:
image: bitnami/zookeeper:3.7
environment: