Add read and write op per second fields (#5210)
This commit is contained in:
parent
df6fbdb1e8
commit
bf7a42643e
|
@ -108,7 +108,9 @@ All fields are collected under the **ceph** measurement and stored as float64s.
|
|||
* bytes\_used (float)
|
||||
* data\_bytes (float)
|
||||
* num\_pgs (float)
|
||||
* op\_per\_sec (float)
|
||||
* op\_per\_sec (float, ceph < 10)
|
||||
* read_op\_per\_sec (float)
|
||||
* write_op\_per\_sec (float)
|
||||
* read\_bytes\_sec (float)
|
||||
* version (float)
|
||||
* write\_bytes\_sec (float)
|
||||
|
@ -132,7 +134,9 @@ All fields are collected under the **ceph** measurement and stored as float64s.
|
|||
* objects (float)
|
||||
|
||||
* ceph\_pool\_stats
|
||||
* op\_per\_sec (float)
|
||||
* op\_per\_sec (float, ceph < 10)
|
||||
* read_op\_per\_sec (float)
|
||||
* write_op\_per\_sec (float)
|
||||
* read\_bytes\_sec (float)
|
||||
* write\_bytes\_sec (float)
|
||||
* recovering\_object\_per\_sec (float)
|
||||
|
|
|
@ -344,7 +344,9 @@ type CephStatus struct {
|
|||
BytesTotal float64 `json:"bytes_total"`
|
||||
ReadBytesSec float64 `json:"read_bytes_sec"`
|
||||
WriteBytesSec float64 `json:"write_bytes_sec"`
|
||||
OpPerSec float64 `json:"op_per_sec"`
|
||||
OpPerSec float64 `json:"op_per_sec"` // This field is no longer reported in ceph 10 and later
|
||||
ReadOpPerSec float64 `json:"read_op_per_sec"`
|
||||
WriteOpPerSec float64 `json:"write_op_per_sec"`
|
||||
} `json:"pgmap"`
|
||||
}
|
||||
|
||||
|
@ -396,7 +398,9 @@ func decodeStatusPgmap(acc telegraf.Accumulator, data *CephStatus) error {
|
|||
"bytes_total": data.PGMap.BytesTotal,
|
||||
"read_bytes_sec": data.PGMap.ReadBytesSec,
|
||||
"write_bytes_sec": data.PGMap.WriteBytesSec,
|
||||
"op_per_sec": data.PGMap.OpPerSec,
|
||||
"op_per_sec": data.PGMap.OpPerSec, // This field is no longer reported in ceph 10 and later
|
||||
"read_op_per_sec": data.PGMap.ReadOpPerSec,
|
||||
"write_op_per_sec": data.PGMap.WriteOpPerSec,
|
||||
}
|
||||
acc.AddFields("ceph_pgmap", fields, map[string]string{})
|
||||
return nil
|
||||
|
@ -470,7 +474,9 @@ type CephOSDPoolStats []struct {
|
|||
ClientIORate struct {
|
||||
ReadBytesSec float64 `json:"read_bytes_sec"`
|
||||
WriteBytesSec float64 `json:"write_bytes_sec"`
|
||||
OpPerSec float64 `json:"op_per_sec"`
|
||||
OpPerSec float64 `json:"op_per_sec"` // This field is no longer reported in ceph 10 and later
|
||||
ReadOpPerSec float64 `json:"read_op_per_sec"`
|
||||
WriteOpPerSec float64 `json:"write_op_per_sec"`
|
||||
} `json:"client_io_rate"`
|
||||
RecoveryRate struct {
|
||||
RecoveringObjectsPerSec float64 `json:"recovering_objects_per_sec"`
|
||||
|
@ -494,7 +500,9 @@ func decodeOsdPoolStats(acc telegraf.Accumulator, input string) error {
|
|||
fields := map[string]interface{}{
|
||||
"read_bytes_sec": pool.ClientIORate.ReadBytesSec,
|
||||
"write_bytes_sec": pool.ClientIORate.WriteBytesSec,
|
||||
"op_per_sec": pool.ClientIORate.OpPerSec,
|
||||
"op_per_sec": pool.ClientIORate.OpPerSec, // This field is no longer reported in ceph 10 and later
|
||||
"read_op_per_sec": pool.ClientIORate.ReadOpPerSec,
|
||||
"write_op_per_sec": pool.ClientIORate.WriteOpPerSec,
|
||||
"recovering_objects_per_sec": pool.RecoveryRate.RecoveringObjectsPerSec,
|
||||
"recovering_bytes_per_sec": pool.RecoveryRate.RecoveringBytesPerSec,
|
||||
"recovering_keys_per_sec": pool.RecoveryRate.RecoveringKeysPerSec,
|
||||
|
|
|
@ -835,7 +835,9 @@ var clusterStatusDump = `
|
|||
"bytes_total": 17335810048000,
|
||||
"read_bytes_sec": 0,
|
||||
"write_bytes_sec": 367217,
|
||||
"op_per_sec": 98
|
||||
"op_per_sec": 98,
|
||||
"read_op_per_sec": 322,
|
||||
"write_op_per_sec": 1022
|
||||
},
|
||||
"mdsmap": {
|
||||
"epoch": 1,
|
||||
|
@ -873,6 +875,8 @@ var cephStatusResults = []expectedResult{
|
|||
"read_bytes_sec": float64(0),
|
||||
"write_bytes_sec": float64(367217),
|
||||
"op_per_sec": float64(98),
|
||||
"read_op_per_sec": float64(322),
|
||||
"write_op_per_sec": float64(1022),
|
||||
},
|
||||
tags: map[string]string{},
|
||||
},
|
||||
|
@ -1014,7 +1018,9 @@ var cephODSPoolStatsDump = `
|
|||
"recovering_keys_per_sec": 0},
|
||||
"client_io_rate": { "read_bytes_sec": 10566067,
|
||||
"write_bytes_sec": 15165220376,
|
||||
"op_per_sec": 9828}}]`
|
||||
"op_per_sec": 9828,
|
||||
"read_op_per_sec": 182,
|
||||
"write_op_per_sec": 473}}]`
|
||||
|
||||
var cephOSDPoolStatsResults = []expectedResult{
|
||||
{
|
||||
|
@ -1023,6 +1029,8 @@ var cephOSDPoolStatsResults = []expectedResult{
|
|||
"read_bytes_sec": float64(0),
|
||||
"write_bytes_sec": float64(0),
|
||||
"op_per_sec": float64(0),
|
||||
"read_op_per_sec": float64(0),
|
||||
"write_op_per_sec": float64(0),
|
||||
"recovering_objects_per_sec": float64(0),
|
||||
"recovering_bytes_per_sec": float64(0),
|
||||
"recovering_keys_per_sec": float64(0),
|
||||
|
@ -1037,6 +1045,8 @@ var cephOSDPoolStatsResults = []expectedResult{
|
|||
"read_bytes_sec": float64(10566067),
|
||||
"write_bytes_sec": float64(15165220376),
|
||||
"op_per_sec": float64(9828),
|
||||
"read_op_per_sec": float64(182),
|
||||
"write_op_per_sec": float64(473),
|
||||
"recovering_objects_per_sec": float64(279),
|
||||
"recovering_bytes_per_sec": float64(176401059),
|
||||
"recovering_keys_per_sec": float64(0),
|
||||
|
|
Loading…
Reference in New Issue