diskio.go 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. // Copyright 2019 Yunion
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package measurements
  15. import "yunion.io/x/onecloud/pkg/apis/monitor"
  16. var diskio = SMeasurement{
  17. Context: []SMonitorContext{
  18. {
  19. Name: "diskio",
  20. DisplayName: "Disk traffic and timing",
  21. ResourceType: monitor.METRIC_RES_TYPE_HOST,
  22. Database: monitor.METRIC_DATABASE_TELE,
  23. },
  24. {
  25. Name: "agent_diskio",
  26. DisplayName: "Disk traffic and timing",
  27. ResourceType: monitor.METRIC_RES_TYPE_AGENT,
  28. Database: monitor.METRIC_DATABASE_TELE,
  29. },
  30. },
  31. Metrics: []SMetric{
  32. {
  33. Name: "bps",
  34. DisplayName: "Disk read and write rate",
  35. Unit: monitor.METRIC_UNIT_BYTEPS,
  36. },
  37. {
  38. Name: "read_bps",
  39. DisplayName: "Disk read rate",
  40. Unit: monitor.METRIC_UNIT_BYTEPS,
  41. },
  42. {
  43. Name: "write_bps",
  44. DisplayName: "Disk write rate",
  45. Unit: monitor.METRIC_UNIT_BYTEPS,
  46. },
  47. {
  48. Name: "read_iops",
  49. DisplayName: "Disk read operate rate",
  50. Unit: monitor.METRIC_UNIT_COUNT,
  51. },
  52. {
  53. Name: "write_iops",
  54. DisplayName: "Disk write operate rate",
  55. Unit: monitor.METRIC_UNIT_COUNT,
  56. },
  57. {
  58. Name: "iops",
  59. DisplayName: "Disk read/write operate rate",
  60. Unit: monitor.METRIC_UNIT_COUNT,
  61. },
  62. {
  63. Name: "reads",
  64. DisplayName: "Number of reads",
  65. Unit: monitor.METRIC_UNIT_COUNT,
  66. },
  67. {
  68. Name: "writes",
  69. DisplayName: "Number of writes",
  70. Unit: monitor.METRIC_UNIT_COUNT,
  71. },
  72. {
  73. Name: "iocount",
  74. DisplayName: "Accumulated I/O request count",
  75. Unit: monitor.METRIC_UNIT_COUNT,
  76. },
  77. {
  78. Name: "read_bytes",
  79. DisplayName: "Bytes read",
  80. Unit: monitor.METRIC_UNIT_BYTE,
  81. },
  82. {
  83. Name: "write_bytes",
  84. DisplayName: "Bytes write",
  85. Unit: monitor.METRIC_UNIT_BYTE,
  86. },
  87. {
  88. Name: "iobytes",
  89. DisplayName: "Bytes of both read and write",
  90. Unit: monitor.METRIC_UNIT_BYTE,
  91. },
  92. {
  93. Name: "read_time",
  94. DisplayName: "Time to wait for read",
  95. Unit: monitor.METRIC_UNIT_MS,
  96. },
  97. {
  98. Name: "write_time",
  99. DisplayName: "Time to wait for write",
  100. Unit: monitor.METRIC_UNIT_MS,
  101. },
  102. {
  103. Name: "io_time",
  104. DisplayName: "I / O request queuing time",
  105. Unit: monitor.METRIC_UNIT_MS,
  106. },
  107. {
  108. Name: "read_await",
  109. DisplayName: "Time to wait for read",
  110. Unit: monitor.METRIC_UNIT_MS,
  111. },
  112. {
  113. Name: "write_await",
  114. DisplayName: "Time to wait for write",
  115. Unit: monitor.METRIC_UNIT_MS,
  116. },
  117. {
  118. Name: "await",
  119. DisplayName: "I / O request queuing time",
  120. Unit: monitor.METRIC_UNIT_MS,
  121. },
  122. {
  123. Name: "merged_reads",
  124. DisplayName: "Merged disk read request count",
  125. Unit: monitor.METRIC_UNIT_COUNT,
  126. },
  127. {
  128. Name: "merged_writes",
  129. DisplayName: "Merged disk write request count",
  130. Unit: monitor.METRIC_UNIT_COUNT,
  131. },
  132. {
  133. Name: "merged_iocount",
  134. DisplayName: "Merged Accumulated I/O request count",
  135. Unit: monitor.METRIC_UNIT_COUNT,
  136. },
  137. {
  138. Name: "weighted_io_time",
  139. DisplayName: "I / O request waiting time",
  140. Unit: monitor.METRIC_UNIT_MS,
  141. },
  142. {
  143. Name: "iops_in_progress",
  144. DisplayName: "Number of I / O requests issued but not yet completed",
  145. Unit: monitor.METRIC_UNIT_COUNT,
  146. },
  147. {
  148. Name: "ioutil",
  149. DisplayName: "IO utilization in percentage",
  150. Unit: monitor.METRIC_UNIT_PERCENT,
  151. },
  152. {
  153. Name: "avgqu_sz",
  154. DisplayName: "Averate queing request count per seconds",
  155. Unit: monitor.METRIC_UNIT_NULL,
  156. },
  157. },
  158. }