Skip to content

Commit

Permalink
Add framework for node and hot threads
Browse files Browse the repository at this point in the history
  • Loading branch information
karenzone committed Dec 27, 2024
1 parent 0cd5d16 commit 4705c87
Showing 1 changed file with 22 additions and 75 deletions.
97 changes: 22 additions & 75 deletions docs/static/spec/openapi/starter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,52 +28,28 @@ servers:
- url: /
security:
- apiKeyAuth: []
paths:

## Node info API

/_node/plugins:
paths:
/_node/<types>:
get:
summary: Get node info
description: >
Get information about all Logstash plugins that are currently installed.
This API returns the output of running the `bin/logstash-plugin list --verbose` command.
operationId: nodePlugins
parameters:
- name: pretty
in: query
schema:
type: boolean
description: >
If you append `?pretty=true` to the request, the JSON returned will be pretty formatted (use it for debugging only!).
responses:
'200':
description: Indicates a successful call
content:
application/json:
examples:
nodePluginsExample1:
total: 1
plugins:
- name: logstash-codec-cef
version: 4.1.2

Get information about Logstash nodes, where `<types>` (optional) specifies the types of node info you want returned.
You can limit the info that is returned by combining any of these types in a comma-separated list:
- `pipelines`
- `os`
- `jvm`
/_node/plugins:
get:
summary: Get plugin info
description: >
Get information about all Logstash plugins that are currently installed.
This API returns the output of running the `bin/logstash-plugin list --verbose` command.
operationId: nodePlugins
parameters:
- name: pretty
in: query
schema:
type: boolean
description: >
If you append `?pretty=true` to the request, the JSON returned will be pretty formatted (use it for debugging only!).
If you append `?pretty=true` to the request, the JSON returned will be pretty formatted. Use it for debugging only!
responses:
'200':
description: Indicates a successful call
Expand All @@ -84,52 +60,21 @@ paths:
total: 1
plugins:
- name: logstash-codec-cef
version: 6.2.7

## Plugins info API (LISA)

version: 4.1.2
/_node/plugins:
get:
summary: Get plugin info
description: >
Get information about all Logstash plugins that are currently installed.
This API returns the output of running the `bin/logstash-plugin list --verbose` command.
This API returns the same output you get by running the `bin/logstash-plugin list --verbose` command.
operationId: nodePlugins
parameters:
- name: pretty
in: query
schema:
type: boolean
description: >
If you append `?pretty=true` to the request, the JSON returned will be pretty formatted (use it for debugging only!).
responses:
'200':
description: Indicates a successful call
content:
application/json:
examples:
nodePluginsExample1:
total: 1
plugins:
- name: logstash-codec-cef
version: 6.2.7

## Node stats API

/_node/plugins:
get:
summary: Get node info
description: >
Get information about all Logstash plugins that are currently installed.
This API returns the output of running the `bin/logstash-plugin list --verbose` command.
operationId: nodePlugins
parameters:
- name: pretty
in: query
schema:
type: boolean
description: >
If you append `?pretty=true` to the request, the JSON returned will be pretty formatted (use it for debugging only!).
If you append `?pretty=true` to the request, the JSON returned will be pretty formatted. Use it for debugging only!
responses:
'200':
description: Indicates a successful call
Expand All @@ -142,9 +87,6 @@ paths:
- name: logstash-codec-cef
version: 4.1.2


## Hot Threads API

/_node/hot_threads:
get:
summary: Get hot threads
Expand All @@ -165,15 +107,20 @@ paths:
type: boolean
description: >
If you append `?human=true` to the request, the JSON returned will be in a human-readable format.
responses:
'200':
description: Indicates a successful call
content:
application/json:
examples:
nodePluginsExample1:
total: 1
plugins:
- name: logstash-codec-cef
version: 4.1.2
nodeHotThreadsExample1:
hot_threads:
- time: 2025-01-06T18:25:28-07:00
busiest_threads: 3
threads:
name: Ruby-0-Thread-7
percent_of_cpu_time: 0.0
state: timed_waiting
path: /path/to/logstash-8.17.0/vendor/bundle/jruby/1.9/gems/puma-2.16.0-java/lib/puma/thread_pool.rb:187
traces: java.lang.Object.wait(Native Method)", "org.jruby.RubyThread.sleep(RubyThread.java:1002)", "org.jruby.RubyKernel.sleep(RubyKernel.java:803)

0 comments on commit 4705c87

Please sign in to comment.