health: fix conflict between ops and bw units

This commit is contained in:
Vaibhav Bhembre 2016-05-17 21:03:54 -04:00
parent 8af54c1593
commit 37afdac4d0
2 changed files with 3 additions and 5 deletions

View File

@ -31,8 +31,8 @@ var (
recoveryIORateRegex = regexp.MustCompile(`(\d+) (\w{2})/s`)
recoveryIOKeysRegex = regexp.MustCompile(`(\d+) keys/s`)
recoveryIOObjectsRegex = regexp.MustCompile(`(\d+) objects/s`)
clientIOReadRegex = regexp.MustCompile(`(\d+) (\w{2})/s rd`)
clientIOWriteRegex = regexp.MustCompile(`(\d+) (\w{2})/s wr`)
clientIOReadRegex = regexp.MustCompile(`(\d+) (\w[bB])/s rd`)
clientIOWriteRegex = regexp.MustCompile(`(\d+) (\w[bB])/s wr`)
clientIOReadOpsRegex = regexp.MustCompile(`(\d+) op/s rd`)
clientIOWriteOpsRegex = regexp.MustCompile(`(\d+) op/s wr`)

View File

@ -309,14 +309,12 @@ $ sudo ceph -s
health HEALTH_OK
monmap e3: 3 mons at {mon01,mon02,mon03}
recovery io 5779 MB/s, 4 keys/s, 1522 objects/s
client io 4273 kB/s rd, 2740 MB/s wr, 2863 op/s rd, 5847 op/s wr
client io 2863 op/s rd, 5847 op/s wr
`,
regexes: []*regexp.Regexp{
regexp.MustCompile(`recovery_io_bytes 5.779e`),
regexp.MustCompile(`recovery_io_keys 4`),
regexp.MustCompile(`recovery_io_objects 1522`),
regexp.MustCompile(`client_io_read_bytes 4.273e`),
regexp.MustCompile(`client_io_write_bytes 2.74e`),
regexp.MustCompile(`client_io_ops 8710`),
regexp.MustCompile(`client_io_read_ops 2863`),
regexp.MustCompile(`client_io_write_ops 5847`),