rabbitmq.go 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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 rabbitmqOverview = SMeasurement{
  17. Context: []SMonitorContext{
  18. {
  19. "rabbitmq_overview", "rabbitmq_overview",
  20. monitor.METRIC_RES_TYPE_EXT_RABBITMQ, monitor.METRIC_DATABASE_TELE,
  21. },
  22. },
  23. Metrics: []SMetric{
  24. {
  25. "channels", "channels", monitor.METRIC_UNIT_COUNT,
  26. },
  27. {
  28. "consumers", "consumers", monitor.METRIC_UNIT_COUNT,
  29. },
  30. {
  31. "messages", "messages", monitor.METRIC_UNIT_COUNT,
  32. },
  33. {
  34. "queues", "queues", monitor.METRIC_UNIT_COUNT,
  35. },
  36. },
  37. }
  38. var rabbitmqNode = SMeasurement{
  39. Context: []SMonitorContext{
  40. {
  41. "rabbitmq_node", "rabbitmq_node",
  42. monitor.METRIC_RES_TYPE_EXT_RABBITMQ, monitor.METRIC_DATABASE_TELE,
  43. },
  44. },
  45. Metrics: []SMetric{
  46. {
  47. "disk_free", "disk_free", monitor.METRIC_UNIT_BYTE,
  48. },
  49. {
  50. "mem_used", "mem_used", monitor.METRIC_UNIT_BYTE,
  51. },
  52. },
  53. }
  54. var rabbitmqQueue = SMeasurement{
  55. Context: []SMonitorContext{
  56. {
  57. "rabbitmq_queue", "rabbitmq_queue",
  58. monitor.METRIC_RES_TYPE_EXT_RABBITMQ, monitor.METRIC_DATABASE_TELE,
  59. },
  60. },
  61. Metrics: []SMetric{
  62. {
  63. "consumer_utilisation", "consumer_utilisation", monitor.METRIC_UNIT_PERCENT,
  64. },
  65. {
  66. "message_bytes", "message_bytes", monitor.METRIC_UNIT_BYTE,
  67. },
  68. {
  69. "message_bytes_ram", "message_bytes_ram", monitor.METRIC_UNIT_BYTE,
  70. },
  71. {
  72. "messages", "messages", monitor.METRIC_UNIT_COUNT,
  73. },
  74. },
  75. }