Infrastructure.constants.ts 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. import { DOCS_URL } from '@/lib/constants'
  2. export interface Attribute {
  3. key: string
  4. name?: string
  5. color: 'white' | 'blue' | 'green' | 'yellow' | 'orange'
  6. }
  7. export interface CategoryAttribute {
  8. anchor: string
  9. key: string // Property from organization usage
  10. attributes: Attribute[] // For querying against stats-daily / infra-monitoring
  11. name: string
  12. unit: 'bytes' | 'absolute' | 'percentage'
  13. links: {
  14. name: string
  15. url: string
  16. }[]
  17. description: string
  18. chartPrefix?: 'Max' | 'Average'
  19. chartDescription: string
  20. }
  21. export interface CategoryMeta {
  22. key: string
  23. name: string
  24. description: string
  25. attributes: CategoryAttribute[]
  26. }
  27. export const INFRA_ACTIVITY_METRICS: CategoryMeta[] = [
  28. {
  29. key: 'infra',
  30. name: 'Infrastructure',
  31. description: 'Usage statistics related to your server instance',
  32. attributes: [
  33. {
  34. anchor: 'cpu',
  35. key: 'max_cpu_usage',
  36. attributes: [{ key: 'max_cpu_usage', color: 'white' }],
  37. name: 'CPU',
  38. unit: 'percentage',
  39. description: 'Max CPU usage of your server.',
  40. chartDescription: '',
  41. links: [
  42. {
  43. name: 'Compute Add-Ons',
  44. url: `${DOCS_URL}/guides/platform/compute-add-ons`,
  45. },
  46. {
  47. name: 'High CPU Usage',
  48. url: `${DOCS_URL}/guides/troubleshooting/high-cpu-usage`,
  49. },
  50. {
  51. name: 'Metrics',
  52. url: `${DOCS_URL}/guides/platform/metrics`,
  53. },
  54. ],
  55. },
  56. {
  57. anchor: 'ram',
  58. key: 'ram_usage',
  59. attributes: [{ key: 'ram_usage', color: 'white' }],
  60. name: 'Memory',
  61. unit: 'percentage',
  62. description:
  63. 'Memory usage of your server.\nYou might observe elevated memory usage, even with little to no load. Besides Postgres, a wide range of services are running under the hood resulting in an elevated base memory usage.',
  64. chartDescription: '',
  65. links: [
  66. {
  67. name: 'Compute Add-Ons',
  68. url: `${DOCS_URL}/guides/platform/compute-add-ons`,
  69. },
  70. {
  71. name: 'High RAM Usage',
  72. url: `${DOCS_URL}/guides/troubleshooting/exhaust-ram`,
  73. },
  74. {
  75. name: 'Metrics',
  76. url: `${DOCS_URL}/guides/platform/metrics`,
  77. },
  78. ],
  79. },
  80. {
  81. anchor: 'disk_io',
  82. key: 'disk_io_consumption',
  83. attributes: [{ key: 'disk_io_consumption', color: 'white' }],
  84. name: 'Disk IO Bandwidth',
  85. unit: 'percentage',
  86. links: [
  87. {
  88. name: 'Disk Throughput and IOPS',
  89. url: `${DOCS_URL}/guides/platform/compute-add-ons#disk-throughput-and-iops`,
  90. },
  91. {
  92. name: 'High Disk I/O',
  93. url: `${DOCS_URL}/guides/troubleshooting/exhaust-disk-io`,
  94. },
  95. {
  96. name: 'Metrics',
  97. url: `${DOCS_URL}/guides/platform/metrics`,
  98. },
  99. ],
  100. description:
  101. 'The disk performance of your workload is determined by the Disk IO bandwidth.\nSmaller compute instances (below 4XL) can burst above their baseline disk throughput and IOPS for short periods of time. Beyond that, the performance reverts to the baseline.',
  102. chartDescription: '',
  103. },
  104. ],
  105. },
  106. ]