Fix: riak with read_repairs available

This commit is contained in:
jsvisa 2016-06-22 11:48:20 +08:00
parent cb3c54a1ae
commit b33abaf1fe
2 changed files with 6 additions and 0 deletions

View File

@ -75,6 +75,8 @@ type riakStats struct {
VnodeIndexWritesTotal int64 `json:"vnode_index_writes_total"` VnodeIndexWritesTotal int64 `json:"vnode_index_writes_total"`
VnodePuts int64 `json:"vnode_puts"` VnodePuts int64 `json:"vnode_puts"`
VnodePutsTotal int64 `json:"vnode_puts_total"` VnodePutsTotal int64 `json:"vnode_puts_total"`
ReadRepairs int64 `json:"read_repairs"`
ReadRepairsTotal int64 `json:"read_repairs_total"`
} }
// A sample configuration to only gather stats from localhost, default port. // A sample configuration to only gather stats from localhost, default port.
@ -187,6 +189,8 @@ func (r *Riak) gatherServer(s string, acc telegraf.Accumulator) error {
"vnode_index_writes_total": stats.VnodeIndexWritesTotal, "vnode_index_writes_total": stats.VnodeIndexWritesTotal,
"vnode_puts": stats.VnodePuts, "vnode_puts": stats.VnodePuts,
"vnode_puts_total": stats.VnodePutsTotal, "vnode_puts_total": stats.VnodePutsTotal,
"read_repairs": stats.ReadRepairs,
"read_repairs_total": stats.ReadRepairsTotal,
} }
// Accumulate the tags and values // Accumulate the tags and values

View File

@ -66,6 +66,8 @@ func TestRiak(t *testing.T) {
"node_put_fsm_time_99": int64(84422), "node_put_fsm_time_99": int64(84422),
"node_put_fsm_time_mean": int64(10832), "node_put_fsm_time_mean": int64(10832),
"node_put_fsm_time_median": int64(4085), "node_put_fsm_time_median": int64(4085),
"read_repairs": int64(2),
"read_repairs_total": int64(7918375),
"node_puts": int64(1155), "node_puts": int64(1155),
"node_puts_total": int64(444895769), "node_puts_total": int64(444895769),
"pbc_active": int64(360), "pbc_active": int64(360),