From b5cb8d9aca686cbf27daada92c234247d01326df Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Fri, 22 Aug 2025 13:29:37 -0700 Subject: [PATCH 1/2] [DOCS] Fix nullable type linting error in OpenAPI document (#18018) (cherry picked from commit 34a7c67692e3dca9d26b93b1d08f6bc54a2b43e6) # Conflicts: # docs/static/spec/openapi/logstash-api.yaml --- docs/static/spec/openapi/logstash-api.yaml | 486 +++++++++++++++++++++ docs/static/spec/openapi/redocly.yaml | 14 +- 2 files changed, 494 insertions(+), 6 deletions(-) diff --git a/docs/static/spec/openapi/logstash-api.yaml b/docs/static/spec/openapi/logstash-api.yaml index 8792f8a7b84..14552586edf 100644 --- a/docs/static/spec/openapi/logstash-api.yaml +++ b/docs/static/spec/openapi/logstash-api.yaml @@ -361,7 +361,65 @@ components: name: Authorization type: apiKey schemas: +<<<<<<< HEAD Statuses: +======= + Common: + type: object + properties: + host: + type: string + description: The name of the host machine. + version: + type: string + description: The version of the Logstash instance. + http_address: + type: string + description: The HTTP address where the Logstash instance is accessible, including the port number. + id: + type: string + description: A unique identifier (uuid) for the Logstash instance. + name: + type: string + description: The name of the Logstash instance. + ephemeral_id: + type: string + description: A unique identifier for the ephemeral session of the Logstash instance. + snapshot: + type: [boolean, 'null'] + status: + $ref: '#/components/schemas/Status' + PipelineSettings: + type: object + properties: + pipeline: + type: object + properties: + workers: + type: integer + batch_size: + type: integer + batch_delay: + type: integer + + NodeInfoPipeline: + type: object + properties: + workers: + type: integer + batch_size: + type: integer + batch_delay: + type: integer + config_reload_automatic: + type: boolean + config_reload_interval: + type: integer + dead_letter_queue_enabled: + type: boolean + + Status: +>>>>>>> 34a7c676 ([DOCS] Fix nullable type linting error in OpenAPI document (#18018)) type: string description: | Health status of Logstash, based on the aggregated status of all indicators. @@ -392,3 +450,431 @@ components: type: array items: type: string +<<<<<<< HEAD +======= + + EventsStats: + type: object + properties: + events: + type: object + properties: + in: + type: integer + format: int64 + filtered: + type: integer + format: int64 + out: + type: integer + format: int64 + duration_in_millis: + type: integer + format: int64 + queue_push_duration_in_millis: + type: integer + format: int64 + + JVMStats: + type: object + properties: + jvm: + type: object + properties: + threads: + type: object + properties: + count: + type: integer + description: The number of active JVM threads. + peak_count: + type: integer + description: The peak number of active JVM threads. + mem: + type: object + properties: + heap_used_percent: + type: integer + description: The percentage of heap memory used. + heap_committed_in_bytes: + type: integer + format: int64 + description: The committed heap memory in bytes. + heap_max_in_bytes: + type: integer + format: int64 + description: The maximum heap memory in bytes. + heap_used_in_bytes: + type: integer + format: int64 + description: The used heap memory in bytes. + non_heap_used_in_bytes: + type: integer + format: int64 + description: The used non-heap memory in bytes. + non_heap_committed_in_bytes: + type: integer + format: int64 + description: The committed non-heap memory in bytes. + pools: + $ref: "#/components/schemas/JVMMemoryPools" + gc: + type: object + properties: + collectors: + $ref: "#/components/schemas/JVMGCCollectors" + uptime_in_millis: + type: integer + format: int64 + description: The JVM uptime in milliseconds. + JVMMemoryPool: + type: object + properties: + peak_used_in_bytes: + type: integer + format: int64 + used_in_bytes: + type: integer + format: int64 + peak_max_in_bytes: + type: integer + format: int64 + max_in_bytes: + type: integer + format: int64 + committed_in_bytes: + type: integer + format: int64 + JVMMemoryPools: + type: object + properties: + survivor: + $ref: "#/components/schemas/JVMMemoryPool" + old: + $ref: "#/components/schemas/JVMMemoryPool" + young: + $ref: "#/components/schemas/JVMMemoryPool" + JVMGCCollector: + type: object + properties: + collection_time_in_millis: + type: integer + format: int64 + collection_count: + type: integer + JVMGCCollectors: + type: object + properties: + old: + $ref: "#/components/schemas/JVMGCCollector" + young: + $ref: "#/components/schemas/JVMGCCollector" + + OSStats: + type: object + properties: + os: + type: object + properties: + name: + type: string + arch: + type: string + version: + type: string + available_processors: + type: integer + + ProcessStats: + type: object + properties: + process: + type: object + properties: + open_file_descriptors: + type: integer + peak_open_file_descriptors: + type: integer + max_file_descriptors: + type: integer + mem: + type: object + properties: + total_virtual_in_bytes: + type: integer + cpu: + type: object + properties: + total_in_millis: + type: integer + percent: + type: integer + load_average: + type: object + properties: + "1m": + type: number + + ThroughputStats: + type: object + properties: + throughput: + description: | + This metric is expressed in events-per-second, and is the rate of events this input plugin is pushing into the pipeline’s queue relative to wall-clock time (`events.in` / second). It includes events that are blocked by the queue and have not yet been accepted. + allOf: # need to use allOf to keep the description + - $ref: "#/components/schemas/FlowWindows" + WorkerStats: + type: object + properties: + worker_utilization: + description: | + This is a unitless metric that indicates the percentage of available worker time being used by this individual plugin (`duration` / (`uptime` * `pipeline.workers`). It is useful for identifying which plugins in a pipeline are using the available worker resources. + allOf: # need to use allOf to keep the description + - $ref: "#/components/schemas/FlowWindows" + worker_millis_per_event: + description: | + This metric is expressed in worker-millis-spent-per-event (`duration_in_millis` / `events.in`) with higher scores indicating more resources spent per event. It is especially useful for identifying issues with plugins that operate on a small subset of events. An "Infinity" value for a given flow window indicates that worker millis have been spent without any events completing processing; this can indicate a plugin that is either stuck or handling only empty batches. + allOf: # need to use allOf to keep the description + - $ref: "#/components/schemas/FlowWindows" + + InputPluginEventsStats: + type: object + properties: + out: + type: integer + format: int64 + queue_push_duration_in_millis: + type: integer + format: int64 + InputPluginStats: + type: object + properties: + id: + type: string + name: + type: string + flow: + $ref: "#/components/schemas/ThroughputStats" + events: + $ref: "#/components/schemas/InputPluginEventsStats" + FilterOutputPluginEventsStats: + type: object + properties: + in: + type: integer + format: int64 + out: + type: integer + format: int64 + duration_in_millis: + type: integer + format: int64 + FilterOutputPluginStats: + type: object + properties: + id: + type: string + name: + type: string + flow: + $ref: "#/components/schemas/WorkerStats" + events: + $ref: "#/components/schemas/FilterOutputPluginEventsStats" + CodecPluginStats: + type: object + properties: + id: + type: string + name: + type: string + decode: + type: object + properties: + duration_in_millis: + type: integer + writes_in: + type: integer + out: + type: integer + encode: + type: object + properties: + duration_in_millis: + type: integer + writes_in: + type: integer + + PipelinesStats: + type: object + properties: + pipelines: + type: object + description: | + A map where each key is a user-defined pipeline name, and the value contains the metrics for that pipeline. + additionalProperties: + description: "Metrics of each plugin in the pipeline, flow statistics, event statistics and queue statistics." + type: object + allOf: + - $ref: "#/components/schemas/EventsStats" + - $ref: "#/components/schemas/PipelineFlowStats" + - type: object + properties: + plugins: + type: object + properties: + inputs: + type: array + items: + $ref: "#/components/schemas/InputPluginStats" + codecs: + type: array + items: + $ref: "#/components/schemas/CodecPluginStats" + filters: + type: array + items: + $ref: "#/components/schemas/FilterOutputPluginStats" + outputs: + type: array + items: + $ref: "#/components/schemas/FilterOutputPluginStats" + - $ref: "#/components/schemas/PipelineReloadStats" + - $ref: "#/components/schemas/PipelineQueueStats" + - $ref: "#/components/schemas/PipelineSettings" + - type: object + properties: + hash: + type: string + description: "A unique hash identifier." + ephemeral_id: + type: string + format: uuid + description: "A temporary unique identifier for the instance." + + PipelineReloadStats: + type: object + properties: + reloads: + type: object + properties: + last_error: + type: [ string, 'null'] + successes: + type: integer + format: int64 + last_success_timestamp: + type: [ string, 'null'] + format: date-time + last_failure_timestamp: + type: [ string, 'null'] + format: date-time + failures: + type: integer + format: int64 + + ReloadStats: + type: object + properties: + reloads: + type: object + properties: + successes: + type: integer + format: int64 + failures: + type: integer + format: int64 + + PipelineQueueStats: + type: object + properties: + queue: + type: object + oneOf: + - type: object + description: "The metrics of persisted queue." + properties: + type: + type: string + enum: + - persisted + capacity: + type: object + properties: + max_unread_events: + type: integer + format: int64 + page_capacity_in_bytes: + type: integer + format: int64 + max_queue_size_in_bytes: + type: integer + format: int64 + queue_size_in_bytes: + type: integer + format: int64 + data: + type: object + properties: + path: + type: string + free_space_in_bytes: + type: integer + format: int64 + storage_type: + type: string + events: + type: integer + format: int64 + events_count: + type: integer + format: int64 + queue_size_in_bytes: + type: integer + format: int64 + max_queue_size_in_bytes: + type: integer + format: int64 + - type: object + description: "The metrics of memory queue." + properties: + type: + type: string + enum: + - memory + events_count: + type: integer + format: int64 + queue_size_in_bytes: + type: integer + format: int64 + max_queue_size_in_bytes: + type: integer + format: int64 + discriminator: + propertyName: type + QueueStats: + type: object + properties: + queue: + type: object + properties: + events_count: + type: integer + format: int64 + + GeoIPDBLicenseStats: + type: object + properties: + status: + type: string + enum: [ "init", "up_to_date", "to_be_expired", "expired" ] + description: The status of the database license. + fail_check_in_days: + type: integer + description: The number of days since the last successful check. + last_updated_at: + type: string + format: date-time + description: The last update timestamp. +>>>>>>> 34a7c676 ([DOCS] Fix nullable type linting error in OpenAPI document (#18018)) diff --git a/docs/static/spec/openapi/redocly.yaml b/docs/static/spec/openapi/redocly.yaml index 139a503ba85..cc5ebb65650 100644 --- a/docs/static/spec/openapi/redocly.yaml +++ b/docs/static/spec/openapi/redocly.yaml @@ -26,15 +26,10 @@ rules: # Paths no-ambiguous-paths: warn no-identical-paths: error - path-excludes-patterns: - severity: error - patterns: - - ^\/internal # Responses operation-4xx-response: off operation-2xx-response: off # Schema - spec: off spec-strict-refs: off # Tags operation-tag-defined: off @@ -49,4 +44,11 @@ rules: severity: warn assertions: maxLength: 45 - minLength: 5 \ No newline at end of file + minLength: 5 + rule/path-exclude-pattern: + subject: + type: Paths + message: Do not include internal APIs + assertions: + notPattern: ^\/internal + severity: error \ No newline at end of file From 0d006f2fa35a7ac9cfac97025b047adc78edf991 Mon Sep 17 00:00:00 2001 From: lcawl Date: Fri, 22 Aug 2025 14:13:51 -0700 Subject: [PATCH 2/2] Revert changes to logstash-api.yaml --- docs/static/spec/openapi/logstash-api.yaml | 486 --------------------- 1 file changed, 486 deletions(-) diff --git a/docs/static/spec/openapi/logstash-api.yaml b/docs/static/spec/openapi/logstash-api.yaml index 14552586edf..8792f8a7b84 100644 --- a/docs/static/spec/openapi/logstash-api.yaml +++ b/docs/static/spec/openapi/logstash-api.yaml @@ -361,65 +361,7 @@ components: name: Authorization type: apiKey schemas: -<<<<<<< HEAD Statuses: -======= - Common: - type: object - properties: - host: - type: string - description: The name of the host machine. - version: - type: string - description: The version of the Logstash instance. - http_address: - type: string - description: The HTTP address where the Logstash instance is accessible, including the port number. - id: - type: string - description: A unique identifier (uuid) for the Logstash instance. - name: - type: string - description: The name of the Logstash instance. - ephemeral_id: - type: string - description: A unique identifier for the ephemeral session of the Logstash instance. - snapshot: - type: [boolean, 'null'] - status: - $ref: '#/components/schemas/Status' - PipelineSettings: - type: object - properties: - pipeline: - type: object - properties: - workers: - type: integer - batch_size: - type: integer - batch_delay: - type: integer - - NodeInfoPipeline: - type: object - properties: - workers: - type: integer - batch_size: - type: integer - batch_delay: - type: integer - config_reload_automatic: - type: boolean - config_reload_interval: - type: integer - dead_letter_queue_enabled: - type: boolean - - Status: ->>>>>>> 34a7c676 ([DOCS] Fix nullable type linting error in OpenAPI document (#18018)) type: string description: | Health status of Logstash, based on the aggregated status of all indicators. @@ -450,431 +392,3 @@ components: type: array items: type: string -<<<<<<< HEAD -======= - - EventsStats: - type: object - properties: - events: - type: object - properties: - in: - type: integer - format: int64 - filtered: - type: integer - format: int64 - out: - type: integer - format: int64 - duration_in_millis: - type: integer - format: int64 - queue_push_duration_in_millis: - type: integer - format: int64 - - JVMStats: - type: object - properties: - jvm: - type: object - properties: - threads: - type: object - properties: - count: - type: integer - description: The number of active JVM threads. - peak_count: - type: integer - description: The peak number of active JVM threads. - mem: - type: object - properties: - heap_used_percent: - type: integer - description: The percentage of heap memory used. - heap_committed_in_bytes: - type: integer - format: int64 - description: The committed heap memory in bytes. - heap_max_in_bytes: - type: integer - format: int64 - description: The maximum heap memory in bytes. - heap_used_in_bytes: - type: integer - format: int64 - description: The used heap memory in bytes. - non_heap_used_in_bytes: - type: integer - format: int64 - description: The used non-heap memory in bytes. - non_heap_committed_in_bytes: - type: integer - format: int64 - description: The committed non-heap memory in bytes. - pools: - $ref: "#/components/schemas/JVMMemoryPools" - gc: - type: object - properties: - collectors: - $ref: "#/components/schemas/JVMGCCollectors" - uptime_in_millis: - type: integer - format: int64 - description: The JVM uptime in milliseconds. - JVMMemoryPool: - type: object - properties: - peak_used_in_bytes: - type: integer - format: int64 - used_in_bytes: - type: integer - format: int64 - peak_max_in_bytes: - type: integer - format: int64 - max_in_bytes: - type: integer - format: int64 - committed_in_bytes: - type: integer - format: int64 - JVMMemoryPools: - type: object - properties: - survivor: - $ref: "#/components/schemas/JVMMemoryPool" - old: - $ref: "#/components/schemas/JVMMemoryPool" - young: - $ref: "#/components/schemas/JVMMemoryPool" - JVMGCCollector: - type: object - properties: - collection_time_in_millis: - type: integer - format: int64 - collection_count: - type: integer - JVMGCCollectors: - type: object - properties: - old: - $ref: "#/components/schemas/JVMGCCollector" - young: - $ref: "#/components/schemas/JVMGCCollector" - - OSStats: - type: object - properties: - os: - type: object - properties: - name: - type: string - arch: - type: string - version: - type: string - available_processors: - type: integer - - ProcessStats: - type: object - properties: - process: - type: object - properties: - open_file_descriptors: - type: integer - peak_open_file_descriptors: - type: integer - max_file_descriptors: - type: integer - mem: - type: object - properties: - total_virtual_in_bytes: - type: integer - cpu: - type: object - properties: - total_in_millis: - type: integer - percent: - type: integer - load_average: - type: object - properties: - "1m": - type: number - - ThroughputStats: - type: object - properties: - throughput: - description: | - This metric is expressed in events-per-second, and is the rate of events this input plugin is pushing into the pipeline’s queue relative to wall-clock time (`events.in` / second). It includes events that are blocked by the queue and have not yet been accepted. - allOf: # need to use allOf to keep the description - - $ref: "#/components/schemas/FlowWindows" - WorkerStats: - type: object - properties: - worker_utilization: - description: | - This is a unitless metric that indicates the percentage of available worker time being used by this individual plugin (`duration` / (`uptime` * `pipeline.workers`). It is useful for identifying which plugins in a pipeline are using the available worker resources. - allOf: # need to use allOf to keep the description - - $ref: "#/components/schemas/FlowWindows" - worker_millis_per_event: - description: | - This metric is expressed in worker-millis-spent-per-event (`duration_in_millis` / `events.in`) with higher scores indicating more resources spent per event. It is especially useful for identifying issues with plugins that operate on a small subset of events. An "Infinity" value for a given flow window indicates that worker millis have been spent without any events completing processing; this can indicate a plugin that is either stuck or handling only empty batches. - allOf: # need to use allOf to keep the description - - $ref: "#/components/schemas/FlowWindows" - - InputPluginEventsStats: - type: object - properties: - out: - type: integer - format: int64 - queue_push_duration_in_millis: - type: integer - format: int64 - InputPluginStats: - type: object - properties: - id: - type: string - name: - type: string - flow: - $ref: "#/components/schemas/ThroughputStats" - events: - $ref: "#/components/schemas/InputPluginEventsStats" - FilterOutputPluginEventsStats: - type: object - properties: - in: - type: integer - format: int64 - out: - type: integer - format: int64 - duration_in_millis: - type: integer - format: int64 - FilterOutputPluginStats: - type: object - properties: - id: - type: string - name: - type: string - flow: - $ref: "#/components/schemas/WorkerStats" - events: - $ref: "#/components/schemas/FilterOutputPluginEventsStats" - CodecPluginStats: - type: object - properties: - id: - type: string - name: - type: string - decode: - type: object - properties: - duration_in_millis: - type: integer - writes_in: - type: integer - out: - type: integer - encode: - type: object - properties: - duration_in_millis: - type: integer - writes_in: - type: integer - - PipelinesStats: - type: object - properties: - pipelines: - type: object - description: | - A map where each key is a user-defined pipeline name, and the value contains the metrics for that pipeline. - additionalProperties: - description: "Metrics of each plugin in the pipeline, flow statistics, event statistics and queue statistics." - type: object - allOf: - - $ref: "#/components/schemas/EventsStats" - - $ref: "#/components/schemas/PipelineFlowStats" - - type: object - properties: - plugins: - type: object - properties: - inputs: - type: array - items: - $ref: "#/components/schemas/InputPluginStats" - codecs: - type: array - items: - $ref: "#/components/schemas/CodecPluginStats" - filters: - type: array - items: - $ref: "#/components/schemas/FilterOutputPluginStats" - outputs: - type: array - items: - $ref: "#/components/schemas/FilterOutputPluginStats" - - $ref: "#/components/schemas/PipelineReloadStats" - - $ref: "#/components/schemas/PipelineQueueStats" - - $ref: "#/components/schemas/PipelineSettings" - - type: object - properties: - hash: - type: string - description: "A unique hash identifier." - ephemeral_id: - type: string - format: uuid - description: "A temporary unique identifier for the instance." - - PipelineReloadStats: - type: object - properties: - reloads: - type: object - properties: - last_error: - type: [ string, 'null'] - successes: - type: integer - format: int64 - last_success_timestamp: - type: [ string, 'null'] - format: date-time - last_failure_timestamp: - type: [ string, 'null'] - format: date-time - failures: - type: integer - format: int64 - - ReloadStats: - type: object - properties: - reloads: - type: object - properties: - successes: - type: integer - format: int64 - failures: - type: integer - format: int64 - - PipelineQueueStats: - type: object - properties: - queue: - type: object - oneOf: - - type: object - description: "The metrics of persisted queue." - properties: - type: - type: string - enum: - - persisted - capacity: - type: object - properties: - max_unread_events: - type: integer - format: int64 - page_capacity_in_bytes: - type: integer - format: int64 - max_queue_size_in_bytes: - type: integer - format: int64 - queue_size_in_bytes: - type: integer - format: int64 - data: - type: object - properties: - path: - type: string - free_space_in_bytes: - type: integer - format: int64 - storage_type: - type: string - events: - type: integer - format: int64 - events_count: - type: integer - format: int64 - queue_size_in_bytes: - type: integer - format: int64 - max_queue_size_in_bytes: - type: integer - format: int64 - - type: object - description: "The metrics of memory queue." - properties: - type: - type: string - enum: - - memory - events_count: - type: integer - format: int64 - queue_size_in_bytes: - type: integer - format: int64 - max_queue_size_in_bytes: - type: integer - format: int64 - discriminator: - propertyName: type - QueueStats: - type: object - properties: - queue: - type: object - properties: - events_count: - type: integer - format: int64 - - GeoIPDBLicenseStats: - type: object - properties: - status: - type: string - enum: [ "init", "up_to_date", "to_be_expired", "expired" ] - description: The status of the database license. - fail_check_in_days: - type: integer - description: The number of days since the last successful check. - last_updated_at: - type: string - format: date-time - description: The last update timestamp. ->>>>>>> 34a7c676 ([DOCS] Fix nullable type linting error in OpenAPI document (#18018))