1 Star 0 Fork 0

sqos / beats

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
data.go 683 Bytes
Copy Edit Raw Blame History
package stats
import (
"github.com/elastic/beats/libbeat/common"
s "github.com/elastic/beats/metricbeat/schema"
c "github.com/elastic/beats/metricbeat/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
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sqos/beats.git
git@gitee.com:sqos/beats.git
sqos
beats
beats
v6.0.0-alpha2

Search

344bd9b3 5694891 D2dac590 5694891