1 Star 0 Fork 0

zhangjungang/beats

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
doc.go 1.86 KB
一键复制 编辑 原始数据 按行查看 历史
/*
Package beater provides the implementation of the libbeat Beater interface for
Metricbeat and functions for running Metricbeat Modules on their own.
Metricbeat collects metrics from operating systems and services. The code for
gathering metrics from a particular service is organized into a logical grouping
called a Module. Each Module has one or more MetricSet implementations which
do the work of collecting a particular set of metrics from the service.
The public interfaces used in implementing Modules and MetricSets are defined in
the github.com/elastic/beats/metricbeat/mb package.
Event Format
Each event generated by Metricbeat has the same general structure. The example
event below was generated by a MetricSet named "cpu" in the "system" Module.
{
"@timestamp": "2016-05-23T08:05:34.853Z",
"beat": {
"hostname": "host.example.com",
"name": "host.example.com"
},
"metricset": {
"host": "localhost",
"module": "system",
"name": "cpu",
"rtt": 115
},
"system": {
"cpu": {
"idle": {
"pct": 0.852,
"ticks": 44421033
},
"iowait": {
"pct": 0,
"ticks": 159735
},
"irq": {
"pct": 0,
"ticks": 0
},
"nice": {
"pct": 0,
"ticks": 0
},
"softirq": {
"pct": 0,
"ticks": 14070
},
"steal": {
"pct": 0,
"ticks": 0
},
"system": {
"pct": 0.0408,
"ticks": 305704
},
"user": {
"pct": 0.1071,
"ticks": 841974
}
}
},
"type": "metricsets"
}
All events are stored in one index called metricbeat by default. Each
MetricSet's data format is potentially unique so the MetricSet data is added to
event as a dictionary under a key that is unique to the MetricSet. The key
is constructed from the Module name and MetricSet name to ensure uniqueness.
All documents are stored under the same type called "metricsets".
*/
package beater
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhangjungang/beats.git
git@gitee.com:zhangjungang/beats.git
zhangjungang
beats
beats
v5.2.1

搜索帮助