Authentication

Basic auth (http)

Basic auth tokens are constructed with the Basic keyword, followed by a space, followed by a base64-encoded string of your username:password (separated by a : colon).

Example: send a Authorization: Basic aGVsbG86aGVsbG8= HTTP header with your requests to authenticate with the API.






Get hot threads

GET /_node/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.

    Default value is 10.

  • The depth of the stack trace to report for each thread.

    Default value is 50.

  • If true, does not return idle threads.

    Default value 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.

Responses

GET /_node/hot_threads
curl \
 --request GET 'http://api.example.com/_node/hot_threads' \
 --user "username:password"
Response examples (200)
{
  "hot_threads": {
    "time": "2025-01-06T18:25:28-07:00",
    "threads": [
      {
        "name": "Ruby-0-Thread-7",
        "state": "timed_waiting",
        "traces": [
          "java.lang.Object.wait(Native Method)",
          "org.jruby.RubyThread.sleep(RubyThread.java:1002)",
          "org.jruby.RubyKernel.sleep(RubyKernel.java:803)"
        ],
        "thread_id": 37,
        "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)"
        ],
        "thread_id": 10,
        "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)"
        ],
        "thread_id": 11,
        "percent_of_cpu_time": 0.85
      }
    ],
    "busiest_threads": 3
  }
}

Node info

Logstash node info, like pipeline settings, OS info, and JVM info.

















Node stats

Node stats, like JVM stats, process stats, event-related stats, and pipeline runtime stats.

Get node statistics

GET /_node/stats

Get node statistics including information about the JVM, process, events, flow, and queue.

Query parameters

  • pretty boolean

    If you append ?pretty=true to the request, the JSON returned will be pretty formatted. Use it for debugging only!

Responses

GET /_node/stats
curl \
 --request GET 'http://api.example.com/_node/stats' \
 --user "username:password"
Response examples (200)
{
  "id": "46e32c2e-b41f-45b7-84c1-1642457f3eba",
  "os": {},
  "jvm": {
    "gc": {
      "collectors": {
        "old": {
          "collection_count": 0,
          "collection_time_in_millis": 0
        },
        "young": {
          "collection_count": 7,
          "collection_time_in_millis": 49
        }
      }
    },
    "mem": {
      "pools": {
        "old": {
          "max_in_bytes": 1073741824,
          "used_in_bytes": 96468992,
          "peak_max_in_bytes": 1073741824,
          "committed_in_bytes": 848297984,
          "peak_used_in_bytes": 96468992
        },
        "young": {
          "max_in_bytes": -1,
          "used_in_bytes": 99614720,
          "peak_max_in_bytes": -1,
          "committed_in_bytes": 199229440,
          "peak_used_in_bytes": 329252864
        },
        "survivor": {
          "max_in_bytes": -1,
          "used_in_bytes": 26214400,
          "peak_max_in_bytes": -1,
          "committed_in_bytes": 26214400,
          "peak_used_in_bytes": 42991616
        }
      },
      "heap_max_in_bytes": 1073741822,
      "heap_used_percent": 20,
      "heap_used_in_bytes": 222298112,
      "non_heap_used_in_bytes": 170675352,
      "heap_committed_in_bytes": 1073741824,
      "non_heap_committed_in_bytes": 176553984
    },
    "threads": {
      "count": 47,
      "peak_count": 47
    },
    "uptime_in_millis": 14712
  },
  "flow": {
    "input_throughput": {
      "current": 0.0776,
      "lifetime": 0.0776
    },
    "filter_throughput": {
      "current": 0.07759,
      "lifetime": 0.07759
    },
    "output_throughput": {
      "current": 0.07759,
      "lifetime": 0.07759
    },
    "queue_backpressure": {
      "current": 0,
      "lifetime": 0
    },
    "worker_concurrency": {
      "current": 0.0004656,
      "lifetime": 0.0004656
    }
  },
  "host": "Mac",
  "name": "Mac",
  "queue": {
    "events_count": 0
  },
  "events": {
    "in": 1,
    "out": 1,
    "filtered": 1,
    "duration_in_millis": 6,
    "queue_push_duration_in_millis": 0
  },
  "status": "green",
  "process": {
    "cpu": {
      "percent": 0,
      "load_average": {
        "1m": 4.07177734375
      },
      "total_in_millis": 20823
    },
    "mem": {
      "total_virtual_in_bytes": 425113862144
    },
    "max_file_descriptors": 10240,
    "open_file_descriptors": 87,
    "peak_open_file_descriptors": 87
  },
  "reloads": {
    "failures": 0,
    "successes": 0
  },
  "version": "9.1.0",
  "pipeline": {
    "workers": 12,
    "batch_size": 125,
    "batch_delay": 50
  },
  "snapshot": null,
  "pipelines": {
    "heartbeat-ruby-stdout": {
      "flow": {
        "input_throughput": {
          "current": 0.07962,
          "lifetime": 0.07962
        },
        "filter_throughput": {
          "current": 0.07963,
          "lifetime": 0.07963
        },
        "output_throughput": {
          "current": 0.07963,
          "lifetime": 0.07963
        },
        "queue_backpressure": {
          "current": 0,
          "lifetime": 0
        },
        "worker_concurrency": {
          "current": 0.0004779,
          "lifetime": 0.0004779
        },
        "worker_utilization": {
          "current": 0.003982,
          "lifetime": 0.003982
        }
      },
      "hash": "c11e0502ebf98956dffa371775fd1cb719f85f819ee166b770b3e982da1c999d",
      "queue": {
        "type": "memory",
        "events_count": 0,
        "queue_size_in_bytes": 0,
        "max_queue_size_in_bytes": 0
      },
      "events": {
        "in": 1,
        "out": 1,
        "filtered": 1,
        "duration_in_millis": 6,
        "queue_push_duration_in_millis": 0
      },
      "plugins": {
        "codecs": [
          {
            "id": "be3a3aba-ee75-4978-af58-d22b856d0e35",
            "name": "rubydebug"
          },
          {
            "id": "plain_22e7b41b-756a-4b52-b03c-a30b31bb6266",
            "name": "plain",
            "decode": {
              "out": 0,
              "writes_in": 0,
              "duration_in_millis": 0
            },
            "encode": {
              "writes_in": 0,
              "duration_in_millis": 0
            }
          }
        ],
        "inputs": [
          {
            "id": "c9ca46e359d73146590ca8af40092342afa922f3cbf07adc4b5009e346cb19f7",
            "flow": {
              "throughput": {
                "current": 0.07963,
                "lifetime": 0.07963
              }
            },
            "name": "heartbeat",
            "events": {
              "out": 1,
              "queue_push_duration_in_millis": 0
            }
          }
        ],
        "filters": [
          {
            "id": "585fa932a4fd506055ead07ee5ebcb3033c27c82ba90cbee73d6ac7e9357333a",
            "flow": {
              "worker_utilization": {
                "current": 0.0006636,
                "lifetime": 0.0006636
              },
              "worker_millis_per_event": {
                "current": 1,
                "lifetime": 1
              }
            },
            "name": "ruby",
            "events": {
              "in": 1,
              "out": 1,
              "duration_in_millis": 1
            }
          }
        ],
        "outputs": [
          {
            "id": "c4f801c8f170b4cb0679f704413773acd5f291929f42302d0a56361400c3741b",
            "flow": {
              "worker_utilization": {
                "current": 0.001991,
                "lifetime": 0.001991
              },
              "worker_millis_per_event": {
                "current": 3,
                "lifetime": 3
              }
            },
            "name": "stdout",
            "events": {
              "in": 1,
              "out": 1,
              "duration_in_millis": 3
            }
          }
        ]
      },
      "reloads": {
        "failures": 0,
        "successes": 0,
        "last_error": null,
        "last_failure_timestamp": null,
        "last_success_timestamp": null
      },
      "pipeline": {
        "workers": 12,
        "batch_size": 125,
        "batch_delay": 50
      },
      "ephemeral_id": "cd90b521-c192-437e-a49e-62fabebde7e2"
    }
  },
  "ephemeral_id": "1752e2fe-7710-44d0-a2f8-a3005b6273c8",
  "http_address": "127.0.0.1:9600"
}
































Get config reload statistics

GET /_node/stats/reloads

Get information about config reload successes and failures.

Query parameters

  • pretty boolean

    If you append ?pretty=true to the request, the JSON returned will be pretty formatted. Use it for debugging only!

Responses

  • 200 application/json

    A JSON object containing process statistics.

    Hide response attribute Show response attribute object
GET /_node/stats/reloads
curl \
 --request GET 'http://api.example.com/_node/stats/reloads' \
 --user "username:password"
Response examples (200)
{
  "reloads": {
    "failures": 0,
    "successes": 0
  }
}