geoip-stats.asciidoc 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. [[geoip-stats-api]]
  2. === GeoIP stats API
  3. ++++
  4. <titleabbrev>GeoIP stats</titleabbrev>
  5. ++++
  6. .New API reference
  7. [sidebar]
  8. --
  9. For the most up-to-date API details, refer to {api-es}/group/endpoint-ingest[Ingest APIs].
  10. --
  11. Gets statistics about the <<geoip-processor,`geoip` processor>>, including
  12. download statistics for GeoIP2 databases used with it.
  13. [source,console]
  14. ----
  15. GET _ingest/geoip/stats
  16. ----
  17. [[geoip-stats-api-request]]
  18. ==== {api-request-title}
  19. `GET _ingest/geoip/stats`
  20. [[geoip-stats-api-prereqs]]
  21. ==== {api-prereq-title}
  22. * If the {es} {security-features} are enabled, you must have the `monitor` or
  23. `manage` <<privileges-list-cluster,cluster privilege>> to use this API.
  24. * If <<ingest-geoip-downloader-enabled,`ingest.geoip.downloader.enabled`>> is
  25. disabled and no custom databases are configured, this API returns zero values and an empty `nodes` object.
  26. [role="child_attributes"]
  27. [[geoip-stats-api-response-body]]
  28. ==== {api-response-body-title}
  29. `stats`::
  30. (object)
  31. Download statistics for all GeoIP2 databases.
  32. +
  33. .Properties of `stats`
  34. [%collapsible%open]
  35. ====
  36. `successful_downloads`::
  37. (integer)
  38. Total number of successful database downloads.
  39. `failed_downloads`::
  40. (integer)
  41. Total number of failed database downloads.
  42. `total_download_time`::
  43. (integer)
  44. Total milliseconds spent downloading databases.
  45. `database_count`::
  46. (integer)
  47. Current number of databases available for use.
  48. `skipped_updates`::
  49. (integer)
  50. Total number of database updates skipped.
  51. ====
  52. `nodes`::
  53. (object)
  54. Statistics for each node.
  55. +
  56. .Properties of `nodes`
  57. [%collapsible%open]
  58. ====
  59. `<node_id>`::
  60. (object)
  61. Downloaded databases for the node. The field key is the node ID.
  62. +
  63. .Properties of `<node_id>`
  64. [%collapsible%open]
  65. =====
  66. `databases`::
  67. (array of objects)
  68. Downloaded databases for the node.
  69. +
  70. .Properties of `databases` objects
  71. [%collapsible%open]
  72. ======
  73. `name`::
  74. (string)
  75. Name of the database.
  76. ======
  77. `cache_stats`::
  78. (object)
  79. GeoIP cache stats for the node.
  80. +
  81. .Properties of `cache_stats`
  82. [%collapsible%open]
  83. ======
  84. `count`::
  85. (Long)
  86. Number of cached entries.
  87. `hits`::
  88. (Long)
  89. The number of enrich lookups served from cache.
  90. `misses`::
  91. (Long)
  92. The number of times geoIP lookups couldn't be
  93. served from cache.
  94. `evictions`::
  95. (Long)
  96. The number cache entries evicted from the cache.
  97. `hits_time_in_millis`::
  98. (Long)
  99. The amount of time in milliseconds spent fetching data from the cache on successful cache hits only.
  100. `misses_time_in_millis`::
  101. (Long)
  102. The amount of time in milliseconds spent fetching data from the cache and the backing GeoIP2 database and updating the
  103. cache, on cache misses only.
  104. ======
  105. `files_in_temp`::
  106. (array of strings)
  107. Downloaded database files, including related license files. {es} stores these
  108. files in the node's <<es-tmpdir,temporary directory>>:
  109. `$ES_TMPDIR/geoip-databases/<node_id>`.
  110. =====
  111. ====