Logstash API Monitor

Source: Internet
Author: User
Tags curl memory usage cpu usage logstash

Logstash 5.0 starts with an API that outputs the metrics and status monitoring of its own processes.

Official documents:
Https://www.elastic.co/guide/en/logstash/current/monitoring-logstash.html#monitoring

Node Info API
Https://www.elastic.co/guide/en/logstash/current/node-info-api.html
Pipeline Gets pipeline-specific information and settings.
OS Gets Node-level info about the OS.
JVM Gets Node-level JVM info, including info about threads.

Curl-s ' Localhost:9600/_node/pipeline '? pretty
Curl-s ' Localhost:9600/_node/os '? pretty
Curl-s ' LOCALHOST:9600/_NODE/JVM '? pretty

Plugins Info API
Https://www.elastic.co/guide/en/logstash/current/plugins-api.html
Curl-s ' Localhost:9600/_node/plugins?pretty '

Node Stats API
Https://www.elastic.co/guide/en/logstash/current/node-stats-api.html

JVM Gets JVM stats, including stats about threads, memory usage, garbage collectors, and uptime.
Process Gets process stats, including stats about file descriptors, memory consumption, and CPU usage.
Pipeline Gets runtime stats about the Logstash pipeline.
Reloads Gets runtime stats about config reload successes and failures.
OS Gets runtime stats about cgroups when Logstash was running in a container.

Curl-s Localhost:9600/_node/stats/jvm?pretty
Curl-s Localhost:9600/_node/stats/process?pretty
Curl-s Localhost:9600/_node/stats/pipeline?pretty
Curl-s Localhost:9600/_node/stats/reloads?pretty
Curl-s Localhost:9600/_node/stats/os?pretty

Hot Threads API
Https://www.elastic.co/guide/en/logstash/current/hot-threads-api.html
The parameters allowed is:
Threads The number of hot threads to return. The default is 3.
Human If true, returns plain text instead of JSON format. The default is False.
ignore_idle_threads If true, does not return idle threads. The default is true.

Curl-s Localhost:9600/_node/hot_threads?pretty
Curl-s Localhost:9600/_node/hot_threads?human=true&threads=1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.