Infrastructure.constants.ts109 lines · main
1import { DOCS_URL } from '@/lib/constants'
2
3export interface Attribute {
4 key: string
5 name?: string
6 color: 'white' | 'blue' | 'green' | 'yellow' | 'orange'
7}
8export interface CategoryAttribute {
9 anchor: string
10 key: string // Property from organization usage
11 attributes: Attribute[] // For querying against stats-daily / infra-monitoring
12 name: string
13 unit: 'bytes' | 'absolute' | 'percentage'
14 links: {
15 name: string
16 url: string
17 }[]
18 description: string
19 chartPrefix?: 'Max' | 'Average'
20 chartDescription: string
21}
22
23export interface CategoryMeta {
24 key: string
25 name: string
26 description: string
27 attributes: CategoryAttribute[]
28}
29
30export const INFRA_ACTIVITY_METRICS: CategoryMeta[] = [
31 {
32 key: 'infra',
33 name: 'Infrastructure',
34 description: 'Usage statistics related to your server instance',
35 attributes: [
36 {
37 anchor: 'cpu',
38 key: 'max_cpu_usage',
39 attributes: [{ key: 'max_cpu_usage', color: 'white' }],
40 name: 'CPU',
41 unit: 'percentage',
42 description: 'Max CPU usage of your server.',
43 chartDescription: '',
44 links: [
45 {
46 name: 'Compute Add-Ons',
47 url: `${DOCS_URL}/guides/platform/compute-add-ons`,
48 },
49 {
50 name: 'High CPU Usage',
51 url: `${DOCS_URL}/guides/troubleshooting/high-cpu-usage`,
52 },
53 {
54 name: 'Metrics',
55 url: `${DOCS_URL}/guides/platform/metrics`,
56 },
57 ],
58 },
59 {
60 anchor: 'ram',
61 key: 'ram_usage',
62 attributes: [{ key: 'ram_usage', color: 'white' }],
63 name: 'Memory',
64 unit: 'percentage',
65 description:
66 '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.',
67 chartDescription: '',
68 links: [
69 {
70 name: 'Compute Add-Ons',
71 url: `${DOCS_URL}/guides/platform/compute-add-ons`,
72 },
73 {
74 name: 'High RAM Usage',
75 url: `${DOCS_URL}/guides/troubleshooting/exhaust-ram`,
76 },
77 {
78 name: 'Metrics',
79 url: `${DOCS_URL}/guides/platform/metrics`,
80 },
81 ],
82 },
83 {
84 anchor: 'disk_io',
85 key: 'disk_io_consumption',
86 attributes: [{ key: 'disk_io_consumption', color: 'white' }],
87 name: 'Disk IO Bandwidth',
88 unit: 'percentage',
89 links: [
90 {
91 name: 'Disk Throughput and IOPS',
92 url: `${DOCS_URL}/guides/platform/compute-add-ons#disk-throughput-and-iops`,
93 },
94 {
95 name: 'High Disk I/O',
96 url: `${DOCS_URL}/guides/troubleshooting/exhaust-disk-io`,
97 },
98 {
99 name: 'Metrics',
100 url: `${DOCS_URL}/guides/platform/metrics`,
101 },
102 ],
103 description:
104 '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.',
105 chartDescription: '',
106 },
107 ],
108 },
109]