forked from TencentBlueKing/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
doc.go
75 lines (69 loc) · 1.86 KB
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
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