1 Star 0 Fork 0

sqos/beats

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
data.go 666 Bytes
一键复制 编辑 原始数据 按行查看 历史
ruflin 提交于 2016-12-15 16:00 . Add Prometheus module to Metricbeat
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) {
return schema.Apply(entries), nil
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sqos/beats.git
git@gitee.com:sqos/beats.git
sqos
beats
beats
v5.6.8

搜索帮助