Skip to content

Martini Services Tracker Databases

Martini enhances tracking capabilities by integrating GeoIP data into Tracker documents. This document outlines the steps for incorporating MaxMind's GeoIP database to automatically append geolocation data to Tracker documents generated from HTTP requests. This guide is designed for professional developers and assumes familiarity with basic concepts and terminology.

GeoIP Database Integration

Martini can enrich Tracker documents with geolocation data using MaxMind's GeoIP database. This process involves either manually installing the database or configuring Martini to automatically handle the download and updates.

Automatic Installation via User Interface

To enable Martini to automatically download the GeoIP database, follow these steps:

  1. Sign Up and License Key: Register for access to GeoLite2 databases on the MaxMind website. Once registered, generate a license key.
  2. Configure Martini: Input the obtained license key into Martini by navigating to the geoip.maxmind-license-key application property.
  3. Download Database: Access the Martini Runtime Admin UI, hover over the Configuration menu, and select Geo IP Database. Martini will then download the database automatically. A confirmation dialog will appear upon successful download.

Installation via REST Endpoints

Martini also supports downloading and updating the GeoIP database through REST endpoints:

  • Endpoint for Database Initialization: Send a POST request to <host>:<port>/esbapi/tracker/geoip/initialize to start the download process. Utilizing the API Explorer is recommended for simplicity.

Upon successful download, Martini logs the following messages:

1
2
3
4
28/04/20 02:26:12.886 INFO [MaxmindGeoIpService] Starting to download cities database
28/04/20 02:26:14.449 INFO [MaxmindGeoIpService] GeoIP database downloaded to /opt/toro-martini/data/geoip/cities.mmdb
28/04/20 02:26:14.631 INFO [MaxmindGeoIpService] Starting to download countries database
28/04/20 02:26:14.870 INFO [MaxmindGeoIpService] GeoIP database downloaded to /opt/toro-martini/data/geoip/countries.mmdb

GeoIP Data Utilization

After installation, Martini automatically adds geolocation data to new Tracker documents. The data includes:

  • Request City
  • Request Coordinates
  • Request Country

These properties are appended to each document originating from an HTTP request.

Google Maps Integration

For visual geolocation tracking, Martini integrates with Google Maps. This feature requires a Google Maps API key. Follow these steps to enable map display:

  1. Obtain Google Maps API Key: Secure an API key through the Google Cloud Platform.
  2. Configure Martini: Add the API key to the tracker.google-maps-api-key application property.

After configuration, the Martini Runtime Admin UI will display the GeoIP location on a map for all tracked documents, enhancing the monitoring experience with geographical insights.