1 Star 0 Fork 0

zhangjungang/beats

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
data.go 691 Bytes
Copy Edit Raw Blame History
Nicolas Ruflin authored 2017-06-07 18:34 +08:00 . Move schema package to metricbeat (#4466)
package stats
import (
"github.com/elastic/beats/libbeat/common"
s "github.com/elastic/beats/libbeat/common/schema"
c "github.com/elastic/beats/libbeat/common/schema/mapstrstr"
)
var (
schema = s.Schema{
"notifications": s.Object{
"queue_length": c.Int("prometheus_notifications_queue_length"),
"dropped": c.Int("prometheus_notifications_dropped_total"),
},
"processes": s.Object{
"open_fds": c.Int("process_open_fds"),
},
"storage": s.Object{
"chunks_to_persist": c.Int("prometheus_local_storage_chunks_to_persist"),
},
}
)
func eventMapping(entries map[string]interface{}) (common.MapStr, error) {
data, _ := schema.Apply(entries)
return data, nil
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhangjungang/beats.git
git@gitee.com:zhangjungang/beats.git
zhangjungang
beats
beats
v6.1.2

Search