Get hot threads
Get information about current hot threads for Logstash. A hot thread is a Java thread that has high CPU usage and takes longer than normal to execute.
Query parameters
-
threads integer
The number of hot threads to return. The default is 10.
-
stacktrace_size integer
The depth of the stack trace to report for each thread. The default is 50.
-
ignore_idle_threads boolean
If true, does not return idle threads. The default is
true
. -
pretty boolean
If you append
?pretty=true
to the request, the JSON returned will be pretty formatted. Use it for debugging only! -
human boolean
If you append
?human=true
to the request, the JSON returned will be in a human-readable format.
GET
/_node/hot_threads
curl \
-X GET http://api.example.com/_node/hot_threads
Response examples (200)
{
"hot_threads": {
"time": "2025-01-06T18:25:28-07:00",
"threads": [
{
"name": "Ruby-0-Thread-7",
"path": "/path/to/logstash-8.17.0/vendor/bundle/jruby/1.9/gems/puma-2.16.0-java/lib/puma/thread_pool.rb:187",
"state": "timed_waiting",
"traces": [
"java.lang.Object.wait(Native Method)",
"org.jruby.RubyThread.sleep(RubyThread.java:1002)",
"org.jruby.RubyKernel.sleep(RubyKernel.java:803)"
],
"percent_of_cpu_time": 0.0
},
{
"name": "[test2]>worker3",
"state": "waiting",
"traces": [
"sun.misc.Unsafe.park(Native Method)",
"java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)",
"java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)"
],
"percent_of_cpu_time": 0.85
},
{
"name": "[test2]>worker2",
"state": "runnable",
"traces": [
"org.jruby.RubyClass.allocate(RubyClass.java:225)",
"org.jruby.RubyClass.newInstance(RubyClass.java:856)",
"org.jruby.RubyClass$INVOKER$i$newInstance.call(RubyClass$INVOKER$i$newInstance.gen)"
],
"percent_of_cpu_time": 0.85
}
],
"busiest_threads": 3
}
}