GeoIP stats API
Gets statistics about the geoip processor, including download statistics for GeoIP2 databases used with it.
resp = client.ingest.geo_ip_stats() print(resp)
response = client.ingest.geo_ip_stats puts response
const response = await client.ingest.geoIpStats(); console.log(response);
GET _ingest/geoip/stats
Request
GET _ingest/geoip/stats
Prerequisites
- If the Elasticsearch security features are enabled, you must have the
monitorormanagecluster privilege to use this API. - If
ingest.geoip.downloader.enabledis disabled and no custom databases are configured, this API returns zero values and an emptynodesobject.
Response body
-
stats -
(object) Download statistics for all GeoIP2 databases.
Properties of
stats-
successful_downloads - (integer) Total number of successful database downloads.
-
failed_downloads - (integer) Total number of failed database downloads.
-
total_download_time - (integer) Total milliseconds spent downloading databases.
-
database_count - (integer) Current number of databases available for use.
-
skipped_updates - (integer) Total number of database updates skipped.
-
-
nodes -
(object) Statistics for each node.
Properties of
nodes-
<node_id> -
(object) Downloaded databases for the node. The field key is the node ID.
Properties of
<node_id>-
databases -
(array of objects) Downloaded databases for the node.
Properties of
databasesobjects-
name - (string) Name of the database.
-
-
cache_stats -
(object) GeoIP cache stats for the node.
Properties of
cache_stats-
count - (Long) Number of cached entries.
-
hits - (Long) The number of enrich lookups served from cache.
-
misses - (Long) The number of times geoIP lookups couldn’t be served from cache.
-
evictions - (Long) The number cache entries evicted from the cache.
-
hits_time_in_millis - (Long) The amount of time in milliseconds spent fetching data from the cache on successful cache hits only.
-
misses_time_in_millis - (Long) The amount of time in milliseconds spent fetching data from the cache and the backing GeoIP2 database and updating the cache, on cache misses only.
-
-
files_in_temp - (array of strings) Downloaded database files, including related license files. Elasticsearch stores these files in the node’s temporary directory:
$ES_TMPDIR/geoip-databases/<node_id>.
-
-
© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/geoip-stats-api.html