forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.go
34 lines (31 loc) · 936 Bytes
/
data.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
package dbstats
import (
s "github.com/elastic/beats/metricbeat/schema"
c "github.com/elastic/beats/metricbeat/schema/mapstriface"
)
var schema = s.Schema{
"db": c.Str("db"),
"collections": c.Int("collections"),
"objects": c.Int("objects"),
"avg_obj_size": c.Int("avgObjSize"),
"data_size": c.Int("dataSize"),
"storage_size": c.Int("storageSize"),
"num_extents": c.Int("numExtents"),
"indexes": c.Int("indexes"),
"index_size": c.Int("indexSize"),
// mmapv1 only
"ns_size_mb": c.Int("nsSizeMB", s.Optional),
// mmapv1 only
"file_size": c.Int("fileSize", s.Optional),
// mmapv1 only
"data_file_version": c.Dict("dataFileVersion", s.Schema{
"major": c.Int("major"),
"minor": c.Int("minor"),
}, c.DictOptional),
// mmapv1 only
"extent_free_list": c.Dict("extentFreeList", s.Schema{
"num": c.Int("num"),
"size": c.Int("size"),
}, c.DictOptional),
}
var eventMapping = schema.Apply