From 86efff464f823e5a927f8f347cfed6b5346e2889 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Wed, 28 Aug 2024 14:54:09 +0400 Subject: [PATCH] Fix GeoIP stats API response (#2818) (cherry picked from commit 6697817a612e402ada6ed942d0c71df7c788f444) --- output/openapi/elasticsearch-openapi.json | 11 ++++++++--- output/schema/schema.json | 20 ++++++++++++++++---- output/typescript/types.ts | 3 ++- specification/ingest/geo_ip_stats/types.ts | 4 +++- 4 files changed, 29 insertions(+), 9 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 4e934965be..3fe80e1e98 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -83873,21 +83873,26 @@ "total_download_time": { "$ref": "#/components/schemas/_types:DurationValueUnitMillis" }, - "database_count": { + "databases_count": { "description": "Current number of databases available for use.", "type": "number" }, "skipped_updates": { "description": "Total number of database updates skipped.", "type": "number" + }, + "expired_databases": { + "description": "Total number of databases not updated after 30 days", + "type": "number" } }, "required": [ "successful_downloads", "failed_downloads", "total_download_time", - "database_count", - "skipped_updates" + "databases_count", + "skipped_updates", + "expired_databases" ] }, "ingest.geo_ip_stats:GeoIpNodeDatabases": { diff --git a/output/schema/schema.json b/output/schema/schema.json index c0bdd10d34..1b4a734175 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -141122,7 +141122,7 @@ }, { "description": "Current number of databases available for use.", - "name": "database_count", + "name": "databases_count", "required": true, "type": { "kind": "instance_of", @@ -141143,9 +141143,21 @@ "namespace": "_types" } } + }, + { + "description": "Total number of databases not updated after 30 days", + "name": "expired_databases", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } } ], - "specLocation": "ingest/geo_ip_stats/types.ts#L24-L35" + "specLocation": "ingest/geo_ip_stats/types.ts#L24-L37" }, { "kind": "interface", @@ -141167,7 +141179,7 @@ } } ], - "specLocation": "ingest/geo_ip_stats/types.ts#L45-L48" + "specLocation": "ingest/geo_ip_stats/types.ts#L47-L50" }, { "description": "Downloaded databases for the node. The field key is the node ID.", @@ -141208,7 +141220,7 @@ } } ], - "specLocation": "ingest/geo_ip_stats/types.ts#L37-L43" + "specLocation": "ingest/geo_ip_stats/types.ts#L39-L45" }, { "attachedBehaviors": [ diff --git a/output/typescript/types.ts b/output/typescript/types.ts index baca68a5c5..3d26fde5b2 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -12646,8 +12646,9 @@ export interface IngestGeoIpStatsGeoIpDownloadStatistics { successful_downloads: integer failed_downloads: integer total_download_time: DurationValue - database_count: integer + databases_count: integer skipped_updates: integer + expired_databases: integer } export interface IngestGeoIpStatsGeoIpNodeDatabaseName { diff --git a/specification/ingest/geo_ip_stats/types.ts b/specification/ingest/geo_ip_stats/types.ts index 7e6c034c9a..d089d85cdb 100644 --- a/specification/ingest/geo_ip_stats/types.ts +++ b/specification/ingest/geo_ip_stats/types.ts @@ -29,9 +29,11 @@ export class GeoIpDownloadStatistics { /** Total milliseconds spent downloading databases. */ total_download_time: DurationValue /** Current number of databases available for use. */ - database_count: integer + databases_count: integer /** Total number of database updates skipped. */ skipped_updates: integer + /** Total number of databases not updated after 30 days */ + expired_databases: integer } /** Downloaded databases for the node. The field key is the node ID. */