Node Stats API
editNode Stats API
editThis functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
The node stats API retrieves runtime stats about Logstash.
GET /_node/stats/<types>
Where <types>
is optional and specifies the types of stats you want to return.
By default, all stats are returned. You can limit the info that’s returned by combining any of the following types in a comma-separated list:
|
Gets JVM stats, including stats about threads, memory usage, and garbage collectors. |
|
Gets process stats, including stats about file descriptors, memory consumption, and CPU usage. |
|
Gets runtime stats about the Logstash pipeline. |
JVM Stats
editThe following request returns a JSON document containing JVM stats:
GET /_node/stats/jvm
Example response:
{ "jvm": { "threads": { "count": 33, "peak_count": 34 }, "mem": { "heap_used_in_bytes": 276974824, "heap_used_percent": 13, "heap_committed_in_bytes": 519045120, "heap_max_in_bytes": 2075918336, "non_heap_used_in_bytes": 182122272, "non_heap_committed_in_bytes": 193372160, "pools": { "survivor": { "peak_used_in_bytes": 8912896, "used_in_bytes": 11182152, "peak_max_in_bytes": 35782656, "max_in_bytes": 71565312, "committed_in_bytes": 17825792 }, "old": { "peak_used_in_bytes": 111736080, "used_in_bytes": 171282544, "peak_max_in_bytes": 715849728, "max_in_bytes": 1431699456, "committed_in_bytes": 357957632 }, "young": { "peak_used_in_bytes": 71630848, "used_in_bytes": 94510128, "peak_max_in_bytes": 286326784, "max_in_bytes": 572653568, "committed_in_bytes": 143261696 } } }, "gc": { "collectors": { "old": { "collection_time_in_millis": 48, "collection_count": 2 }, "young": { "collection_time_in_millis": 316, "collection_count": 23 } } } }
Process Stats
editThe following request returns a JSON document containing process stats:
GET /_node/stats/process
Example response:
{ "process": { "open_file_descriptors": 60, "peak_open_file_descriptors": 65, "max_file_descriptors": 10240, "mem": { "total_virtual_in_bytes": 5364461568 }, "cpu": { "total_in_millis": 101294404000, "percent": 0 } }
Pipeline Stats
editThe following request returns a JSON document containing pipeline stats, including the number of events that were input, filtered, or output by the pipeline. The request also returns stats for each configured input, filter, or output stage, and info about whether config reload (if configured) failed or succeeded.
GET /_node/stats/pipeline
Example response:
{ "pipeline": { "events": { "duration_in_millis": 7863504, "in": 100, "filtered": 100, "out": 100 }, "plugins": { "inputs": [], "filters": [ { "id": "grok_20e5cb7f7c9e712ef9750edf94aefb465e3e361b-2", "events": { "duration_in_millis": 48, "in": 100, "out": 100 }, "matches": 100, "patterns_per_field": { "message": 1 }, "name": "grok" }, { "id": "geoip_20e5cb7f7c9e712ef9750edf94aefb465e3e361b-3", "events": { "duration_in_millis": 141, "in": 100, "out": 100 }, "name": "geoip" } ], "outputs": [ { "id": "20e5cb7f7c9e712ef9750edf94aefb465e3e361b-4", "events": { "in": 100, "out": 100 }, "name": "elasticsearch" } ] }, "reloads": { "last_error": null, "successes": 0, "last_success_timestamp": null, "last_failure_timestamp": null, "failures": 0 } }
See Common Options for a list of options that can be applied to all Logstash monitoring APIs.