forked from premendrasingh/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.go
46 lines (44 loc) · 1.06 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
package dbstats
import (
s "github.com/elastic/beats/libbeat/common/schema"
c "github.com/elastic/beats/libbeat/common/schema/mapstriface"
)
var schema = s.Schema{
"db": c.Str("db"),
"collections": c.Int("collections"),
"objects": c.Int("objects"),
"avg_obj_size": s.Object{
"bytes": c.Int("avgObjSize"),
},
"data_size": s.Object{
"bytes": c.Int("dataSize"),
},
"storage_size": s.Object{
"bytes": c.Int("storageSize"),
},
"num_extents": c.Int("numExtents"),
"indexes": c.Int("indexes"),
"index_size": s.Object{
"bytes": c.Int("indexSize"),
},
// mmapv1 only
"ns_size_mb": s.Object{
"mb": c.Int("nsSizeMB", s.Optional),
},
// mmapv1 only
"file_size": s.Object{
"bytes": 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": s.Object{
"bytes": c.Int("size", s.Optional),
},
}, c.DictOptional),
}