|
Logstash 5.0 开始,提供了输出自身进程的指标和状态监控的 API。
回顾
运行Logstash时,它将自动捕获运行时指标,可用于监视Logstash部署的运行状况和性能。
地址:https://www.elastic.co/guide/en/ ... oring-logstash.html
Logstash收集的指标包括:
Logstash节点信息,例如管道设置,操作系统信息和JVM信息。
插件信息,包括已安装插件的列表。
节点统计信息,例如JVM统计信息,进程统计信息,与事件相关的统计信息以及管道运行时统计信息。
您可以使用Logstash提供的监视API来检索这些指标。这些API默认情况下可用,不需要任何额外的配置。
Node Info API:https://www.elastic.co/guide/en/ ... /node-info-api.html
Plugins Info API:https://www.elastic.co/guide/en/logstash/current/plugins-api.html
Node Stats API:https://www.elastic.co/guide/en/ ... node-stats-api.html
Hot Threads API:https://www.elastic.co/guide/en/ ... ot-threads-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.
events
Gets event-related statistics for the Logstash instance (regardless of how many pipelines were created and destroyed).
pipelines
Gets runtime stats about each Logstash pipeline.
reloads
Gets runtime stats about config reload successes and failures.
os
Gets runtime stats about cgroups when Logstash is running in a container.
查看统计信息
以下请求返回一个JSON文档,其中包含Logstash实例的事件相关统计信息:
{
"host" : "DESKTOP-OL3CEUC",
"version" : "7.10.2",
"http_address" : "127.0.0.1:9600",
"id" : "1aa23f91-e00b-4667-8a2c-65a3b0d85c81",
"name" : "DESKTOP-OL3CEUC",
"ephemeral_id" : "17960ea9-6cc1-44d9-85a9-83a718ba4682",
"status" : "green",
"snapshot" : false,
"pipeline" : {
"workers" : 8,
"batch_size" : 125,
"batch_delay" : 50
},
"events" : {
"in" : 106160,
"filtered" : 106160,
"out" : 106160,
"duration_in_millis" : 113552,
"queue_push_duration_in_millis" : 6303
}
}
(完)
|
上一篇:IIS DELETE PUT 请求 405 解决方案下一篇:Java 使用 JDBC 连接 sqlite URL 问题
|