@oneuptime/common 10.0.55 → 10.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/DatabaseModels/DockerHost.ts +662 -0
- package/Models/DatabaseModels/GlobalConfig.ts +112 -0
- package/Models/DatabaseModels/Index.ts +2 -0
- package/Server/API/TelemetryAPI.ts +352 -16
- package/Server/Infrastructure/ClickhouseConfig.ts +9 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1774000000002-MigrationName.ts +76 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1775766676723-MigrationName.ts +133 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1775900000000-AddGlobalSmtpOAuth.ts +51 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +6 -0
- package/Server/Services/DockerHostService.ts +173 -0
- package/Server/Services/ExceptionAggregationService.ts +335 -0
- package/Server/Services/Index.ts +2 -0
- package/Server/Services/LogAggregationService.ts +17 -0
- package/Server/Services/MonitorService.ts +21 -21
- package/Server/Services/TraceAggregationService.ts +514 -0
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +73 -1
- package/Tests/Server/Services/LogAggregationService.test.ts +2 -2
- package/Tests/__mocks__/mermaid.js +18 -0
- package/Tests/__mocks__/react-markdown.js +17 -0
- package/Tests/__mocks__/react-syntax-highlighter.js +19 -0
- package/Tests/__mocks__/remark-gfm.js +8 -0
- package/Types/Icon/IconProp.ts +1 -0
- package/Types/Monitor/DockerAlertTemplates.ts +507 -0
- package/Types/Monitor/DockerMetricCatalog.ts +226 -0
- package/Types/Monitor/MonitorStep.ts +33 -0
- package/Types/Monitor/MonitorStepDockerMonitor.ts +38 -0
- package/Types/Monitor/MonitorType.ts +15 -1
- package/Types/Permission.ts +38 -0
- package/UI/Components/Icon/Icon.tsx +87 -0
- package/UI/Components/Markdown.tsx/MarkdownEditor.tsx +7 -132
- package/UI/Components/ModelDetail/CardModelDetail.tsx +11 -1
- package/UI/Components/TelemetryViewer/TelemetryViewer.tsx +285 -0
- package/UI/Components/TelemetryViewer/components/TelemetryActiveFilterChips.tsx +85 -0
- package/UI/Components/TelemetryViewer/components/TelemetryDetailPanel.tsx +156 -0
- package/UI/Components/TelemetryViewer/components/TelemetryFacetSection.tsx +160 -0
- package/UI/Components/TelemetryViewer/components/TelemetryFacetSidebar.tsx +85 -0
- package/UI/Components/TelemetryViewer/components/TelemetryFacetValueRow.tsx +102 -0
- package/UI/Components/TelemetryViewer/components/TelemetryHistogram.tsx +280 -0
- package/UI/Components/TelemetryViewer/components/TelemetryHistogramTooltip.tsx +125 -0
- package/UI/Components/TelemetryViewer/components/TelemetryPagination.tsx +114 -0
- package/UI/Components/TelemetryViewer/components/TelemetrySearchBar.tsx +378 -0
- package/UI/Components/TelemetryViewer/components/TelemetrySearchHelp.tsx +78 -0
- package/UI/Components/TelemetryViewer/components/TelemetrySearchSuggestions.tsx +64 -0
- package/UI/Components/TelemetryViewer/components/TelemetryTimeRangePicker.tsx +193 -0
- package/UI/Components/TelemetryViewer/types.ts +67 -0
- package/build/dist/Models/DatabaseModels/DockerHost.js +686 -0
- package/build/dist/Models/DatabaseModels/DockerHost.js.map +1 -0
- package/build/dist/Models/DatabaseModels/GlobalConfig.js +117 -0
- package/build/dist/Models/DatabaseModels/GlobalConfig.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +2 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Server/API/TelemetryAPI.js +237 -16
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/ClickhouseConfig.js +9 -0
- package/build/dist/Server/Infrastructure/ClickhouseConfig.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774000000002-MigrationName.js +35 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774000000002-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1775766676723-MigrationName.js +52 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1775766676723-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1775900000000-AddGlobalSmtpOAuth.js +26 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1775900000000-AddGlobalSmtpOAuth.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +6 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Services/DockerHostService.js +162 -0
- package/build/dist/Server/Services/DockerHostService.js.map +1 -0
- package/build/dist/Server/Services/ExceptionAggregationService.js +224 -0
- package/build/dist/Server/Services/ExceptionAggregationService.js.map +1 -0
- package/build/dist/Server/Services/Index.js +2 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/LogAggregationService.js +11 -0
- package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
- package/build/dist/Server/Services/MonitorService.js +19 -17
- package/build/dist/Server/Services/MonitorService.js.map +1 -1
- package/build/dist/Server/Services/TraceAggregationService.js +364 -0
- package/build/dist/Server/Services/TraceAggregationService.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +46 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Tests/Server/Services/LogAggregationService.test.js +2 -2
- package/build/dist/Tests/Server/Services/LogAggregationService.test.js.map +1 -1
- package/build/dist/Types/Icon/IconProp.js +1 -0
- package/build/dist/Types/Icon/IconProp.js.map +1 -1
- package/build/dist/Types/Monitor/DockerAlertTemplates.js +410 -0
- package/build/dist/Types/Monitor/DockerAlertTemplates.js.map +1 -0
- package/build/dist/Types/Monitor/DockerMetricCatalog.js +192 -0
- package/build/dist/Types/Monitor/DockerMetricCatalog.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorStep.js +23 -0
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStepDockerMonitor.js +21 -0
- package/build/dist/Types/Monitor/MonitorStepDockerMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorType.js +14 -1
- package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
- package/build/dist/Types/Permission.js +36 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/UI/Components/Icon/Icon.js +13 -0
- package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
- package/build/dist/UI/Components/Markdown.tsx/MarkdownEditor.js +7 -75
- package/build/dist/UI/Components/Markdown.tsx/MarkdownEditor.js.map +1 -1
- package/build/dist/UI/Components/ModelDetail/CardModelDetail.js +8 -1
- package/build/dist/UI/Components/ModelDetail/CardModelDetail.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/TelemetryViewer.js +71 -0
- package/build/dist/UI/Components/TelemetryViewer/TelemetryViewer.js.map +1 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryActiveFilterChips.js +39 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryActiveFilterChips.js.map +1 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryDetailPanel.js +61 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryDetailPanel.js.map +1 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryFacetSection.js +66 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryFacetSection.js.map +1 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryFacetSidebar.js +41 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryFacetSidebar.js.map +1 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryFacetValueRow.js +35 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryFacetValueRow.js.map +1 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryHistogram.js +132 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryHistogram.js.map +1 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryHistogramTooltip.js +65 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryHistogramTooltip.js.map +1 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryPagination.js +52 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryPagination.js.map +1 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetrySearchBar.js +224 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetrySearchBar.js.map +1 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetrySearchHelp.js +35 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetrySearchHelp.js.map +1 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetrySearchSuggestions.js +27 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetrySearchSuggestions.js.map +1 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryTimeRangePicker.js +97 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryTimeRangePicker.js.map +1 -0
- package/build/dist/UI/Components/TelemetryViewer/types.js +6 -0
- package/build/dist/UI/Components/TelemetryViewer/types.js.map +1 -0
- package/jest.config.json +6 -1
- package/package.json +1 -1
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import MetricsAggregationType from "../Metrics/MetricsAggregationType";
|
|
2
|
+
|
|
3
|
+
export type DockerMetricCategory =
|
|
4
|
+
| "CPU"
|
|
5
|
+
| "Memory"
|
|
6
|
+
| "Network"
|
|
7
|
+
| "BlockIO"
|
|
8
|
+
| "Container";
|
|
9
|
+
|
|
10
|
+
export interface DockerMetricDefinition {
|
|
11
|
+
id: string;
|
|
12
|
+
friendlyName: string;
|
|
13
|
+
description: string;
|
|
14
|
+
metricName: string;
|
|
15
|
+
category: DockerMetricCategory;
|
|
16
|
+
defaultAggregation: MetricsAggregationType;
|
|
17
|
+
unit?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const dockerMetricCatalog: Array<DockerMetricDefinition> = [
|
|
21
|
+
// CPU Metrics
|
|
22
|
+
{
|
|
23
|
+
id: "container-cpu-usage-total",
|
|
24
|
+
friendlyName: "Container CPU Usage (Total)",
|
|
25
|
+
description: "Total CPU time consumed by the container",
|
|
26
|
+
metricName: "container.cpu.usage.total",
|
|
27
|
+
category: "CPU",
|
|
28
|
+
defaultAggregation: MetricsAggregationType.Avg,
|
|
29
|
+
unit: "ns",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: "container-cpu-utilization",
|
|
33
|
+
friendlyName: "Container CPU Utilization",
|
|
34
|
+
description:
|
|
35
|
+
"CPU utilization of the container as a percentage (100% = 1 full CPU core)",
|
|
36
|
+
metricName: "container.cpu.utilization",
|
|
37
|
+
category: "CPU",
|
|
38
|
+
defaultAggregation: MetricsAggregationType.Avg,
|
|
39
|
+
unit: "%",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: "container-cpu-usage-percpu",
|
|
43
|
+
friendlyName: "Container CPU Usage (Per Core)",
|
|
44
|
+
description: "Per-core CPU usage of the container",
|
|
45
|
+
metricName: "container.cpu.usage.percpu",
|
|
46
|
+
category: "CPU",
|
|
47
|
+
defaultAggregation: MetricsAggregationType.Avg,
|
|
48
|
+
unit: "ns",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: "container-cpu-throttled-time",
|
|
52
|
+
friendlyName: "Container CPU Throttled Time",
|
|
53
|
+
description: "Total time the container CPU has been throttled",
|
|
54
|
+
metricName: "container.cpu.throttling_data.throttled_time",
|
|
55
|
+
category: "CPU",
|
|
56
|
+
defaultAggregation: MetricsAggregationType.Sum,
|
|
57
|
+
unit: "ns",
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
// Memory Metrics
|
|
61
|
+
{
|
|
62
|
+
id: "container-memory-usage-total",
|
|
63
|
+
friendlyName: "Container Memory Usage",
|
|
64
|
+
description: "Total memory usage of the container",
|
|
65
|
+
metricName: "container.memory.usage.total",
|
|
66
|
+
category: "Memory",
|
|
67
|
+
defaultAggregation: MetricsAggregationType.Avg,
|
|
68
|
+
unit: "bytes",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: "container-memory-usage-limit",
|
|
72
|
+
friendlyName: "Container Memory Limit",
|
|
73
|
+
description: "Memory limit configured for the container",
|
|
74
|
+
metricName: "container.memory.usage.limit",
|
|
75
|
+
category: "Memory",
|
|
76
|
+
defaultAggregation: MetricsAggregationType.Max,
|
|
77
|
+
unit: "bytes",
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: "container-memory-percent",
|
|
81
|
+
friendlyName: "Container Memory Percent",
|
|
82
|
+
description:
|
|
83
|
+
"Memory usage as a percentage of the container limit or host total",
|
|
84
|
+
metricName: "container.memory.percent",
|
|
85
|
+
category: "Memory",
|
|
86
|
+
defaultAggregation: MetricsAggregationType.Avg,
|
|
87
|
+
unit: "%",
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: "container-memory-rss",
|
|
91
|
+
friendlyName: "Container Memory RSS",
|
|
92
|
+
description: "Resident set size (non-swapped physical memory) used",
|
|
93
|
+
metricName: "container.memory.rss",
|
|
94
|
+
category: "Memory",
|
|
95
|
+
defaultAggregation: MetricsAggregationType.Avg,
|
|
96
|
+
unit: "bytes",
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: "container-memory-cache",
|
|
100
|
+
friendlyName: "Container Memory Cache",
|
|
101
|
+
description: "Amount of memory used as page cache",
|
|
102
|
+
metricName: "container.memory.cache",
|
|
103
|
+
category: "Memory",
|
|
104
|
+
defaultAggregation: MetricsAggregationType.Avg,
|
|
105
|
+
unit: "bytes",
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
// Network Metrics
|
|
109
|
+
{
|
|
110
|
+
id: "container-network-rx-bytes",
|
|
111
|
+
friendlyName: "Container Network Received",
|
|
112
|
+
description: "Bytes received over the network by the container",
|
|
113
|
+
metricName: "container.network.io.usage.rx_bytes",
|
|
114
|
+
category: "Network",
|
|
115
|
+
defaultAggregation: MetricsAggregationType.Sum,
|
|
116
|
+
unit: "bytes",
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
id: "container-network-tx-bytes",
|
|
120
|
+
friendlyName: "Container Network Transmitted",
|
|
121
|
+
description: "Bytes transmitted over the network by the container",
|
|
122
|
+
metricName: "container.network.io.usage.tx_bytes",
|
|
123
|
+
category: "Network",
|
|
124
|
+
defaultAggregation: MetricsAggregationType.Sum,
|
|
125
|
+
unit: "bytes",
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
id: "container-network-rx-packets",
|
|
129
|
+
friendlyName: "Container Network Packets Received",
|
|
130
|
+
description: "Packets received over the network by the container",
|
|
131
|
+
metricName: "container.network.io.usage.rx_packets",
|
|
132
|
+
category: "Network",
|
|
133
|
+
defaultAggregation: MetricsAggregationType.Sum,
|
|
134
|
+
unit: "count",
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
id: "container-network-tx-packets",
|
|
138
|
+
friendlyName: "Container Network Packets Transmitted",
|
|
139
|
+
description: "Packets transmitted over the network by the container",
|
|
140
|
+
metricName: "container.network.io.usage.tx_packets",
|
|
141
|
+
category: "Network",
|
|
142
|
+
defaultAggregation: MetricsAggregationType.Sum,
|
|
143
|
+
unit: "count",
|
|
144
|
+
},
|
|
145
|
+
|
|
146
|
+
// Block I/O Metrics
|
|
147
|
+
{
|
|
148
|
+
id: "container-blockio-read",
|
|
149
|
+
friendlyName: "Container Block I/O Read",
|
|
150
|
+
description: "Bytes read from block devices by the container",
|
|
151
|
+
metricName: "container.blockio.io_service_bytes_recursive.read",
|
|
152
|
+
category: "BlockIO",
|
|
153
|
+
defaultAggregation: MetricsAggregationType.Sum,
|
|
154
|
+
unit: "bytes",
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
id: "container-blockio-write",
|
|
158
|
+
friendlyName: "Container Block I/O Write",
|
|
159
|
+
description: "Bytes written to block devices by the container",
|
|
160
|
+
metricName: "container.blockio.io_service_bytes_recursive.write",
|
|
161
|
+
category: "BlockIO",
|
|
162
|
+
defaultAggregation: MetricsAggregationType.Sum,
|
|
163
|
+
unit: "bytes",
|
|
164
|
+
},
|
|
165
|
+
|
|
166
|
+
// Container Info Metrics
|
|
167
|
+
{
|
|
168
|
+
id: "container-uptime",
|
|
169
|
+
friendlyName: "Container Uptime",
|
|
170
|
+
description: "How long the container has been running",
|
|
171
|
+
metricName: "container.uptime",
|
|
172
|
+
category: "Container",
|
|
173
|
+
defaultAggregation: MetricsAggregationType.Max,
|
|
174
|
+
unit: "seconds",
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
id: "container-restarts",
|
|
178
|
+
friendlyName: "Container Restarts",
|
|
179
|
+
description: "Number of times the container has restarted",
|
|
180
|
+
metricName: "container.restarts",
|
|
181
|
+
category: "Container",
|
|
182
|
+
defaultAggregation: MetricsAggregationType.Max,
|
|
183
|
+
unit: "count",
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
id: "container-pids-count",
|
|
187
|
+
friendlyName: "Container Process Count",
|
|
188
|
+
description: "Number of processes running inside the container",
|
|
189
|
+
metricName: "container.pids.count",
|
|
190
|
+
category: "Container",
|
|
191
|
+
defaultAggregation: MetricsAggregationType.Avg,
|
|
192
|
+
unit: "count",
|
|
193
|
+
},
|
|
194
|
+
];
|
|
195
|
+
|
|
196
|
+
export function getAllDockerMetrics(): Array<DockerMetricDefinition> {
|
|
197
|
+
return dockerMetricCatalog;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export function getDockerMetricsByCategory(
|
|
201
|
+
category: DockerMetricCategory,
|
|
202
|
+
): Array<DockerMetricDefinition> {
|
|
203
|
+
return dockerMetricCatalog.filter((m: DockerMetricDefinition) => {
|
|
204
|
+
return m.category === category;
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export function getDockerMetricById(
|
|
209
|
+
id: string,
|
|
210
|
+
): DockerMetricDefinition | undefined {
|
|
211
|
+
return dockerMetricCatalog.find((m: DockerMetricDefinition) => {
|
|
212
|
+
return m.id === id;
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export function getDockerMetricByMetricName(
|
|
217
|
+
metricName: string,
|
|
218
|
+
): DockerMetricDefinition | undefined {
|
|
219
|
+
return dockerMetricCatalog.find((m: DockerMetricDefinition) => {
|
|
220
|
+
return m.metricName === metricName;
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export function getAllDockerMetricCategories(): Array<DockerMetricCategory> {
|
|
225
|
+
return ["CPU", "Memory", "Network", "BlockIO", "Container"];
|
|
226
|
+
}
|
|
@@ -44,6 +44,9 @@ import MonitorStepExternalStatusPageMonitor, {
|
|
|
44
44
|
import MonitorStepKubernetesMonitor, {
|
|
45
45
|
MonitorStepKubernetesMonitorUtil,
|
|
46
46
|
} from "./MonitorStepKubernetesMonitor";
|
|
47
|
+
import MonitorStepDockerMonitor, {
|
|
48
|
+
MonitorStepDockerMonitorUtil,
|
|
49
|
+
} from "./MonitorStepDockerMonitor";
|
|
47
50
|
import Zod, { ZodSchema } from "../../Utils/Schema/Zod";
|
|
48
51
|
|
|
49
52
|
export interface MonitorStepType {
|
|
@@ -102,6 +105,9 @@ export interface MonitorStepType {
|
|
|
102
105
|
|
|
103
106
|
// Kubernetes monitor
|
|
104
107
|
kubernetesMonitor?: MonitorStepKubernetesMonitor | undefined;
|
|
108
|
+
|
|
109
|
+
// Docker monitor
|
|
110
|
+
dockerMonitor?: MonitorStepDockerMonitor | undefined;
|
|
105
111
|
}
|
|
106
112
|
|
|
107
113
|
export default class MonitorStep extends DatabaseProperty {
|
|
@@ -133,6 +139,7 @@ export default class MonitorStep extends DatabaseProperty {
|
|
|
133
139
|
domainMonitor: undefined,
|
|
134
140
|
externalStatusPageMonitor: undefined,
|
|
135
141
|
kubernetesMonitor: undefined,
|
|
142
|
+
dockerMonitor: undefined,
|
|
136
143
|
};
|
|
137
144
|
}
|
|
138
145
|
|
|
@@ -169,6 +176,7 @@ export default class MonitorStep extends DatabaseProperty {
|
|
|
169
176
|
domainMonitor: undefined,
|
|
170
177
|
externalStatusPageMonitor: undefined,
|
|
171
178
|
kubernetesMonitor: undefined,
|
|
179
|
+
dockerMonitor: undefined,
|
|
172
180
|
};
|
|
173
181
|
|
|
174
182
|
return monitorStep;
|
|
@@ -297,6 +305,13 @@ export default class MonitorStep extends DatabaseProperty {
|
|
|
297
305
|
return this;
|
|
298
306
|
}
|
|
299
307
|
|
|
308
|
+
public setDockerMonitor(
|
|
309
|
+
dockerMonitor: MonitorStepDockerMonitor,
|
|
310
|
+
): MonitorStep {
|
|
311
|
+
this.data!.dockerMonitor = dockerMonitor;
|
|
312
|
+
return this;
|
|
313
|
+
}
|
|
314
|
+
|
|
300
315
|
public setCustomCode(customCode: string): MonitorStep {
|
|
301
316
|
this.data!.customCode = customCode;
|
|
302
317
|
return this;
|
|
@@ -326,6 +341,7 @@ export default class MonitorStep extends DatabaseProperty {
|
|
|
326
341
|
logMonitor: undefined,
|
|
327
342
|
exceptionMonitor: undefined,
|
|
328
343
|
kubernetesMonitor: undefined,
|
|
344
|
+
dockerMonitor: undefined,
|
|
329
345
|
},
|
|
330
346
|
};
|
|
331
347
|
}
|
|
@@ -446,6 +462,16 @@ export default class MonitorStep extends DatabaseProperty {
|
|
|
446
462
|
}
|
|
447
463
|
}
|
|
448
464
|
|
|
465
|
+
if (monitorType === MonitorType.Docker) {
|
|
466
|
+
if (!value.data.dockerMonitor) {
|
|
467
|
+
return "Docker monitor configuration is required";
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
if (!value.data.dockerMonitor.hostIdentifier) {
|
|
471
|
+
return "Docker host is required";
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
|
|
449
475
|
return null;
|
|
450
476
|
}
|
|
451
477
|
|
|
@@ -513,6 +539,9 @@ export default class MonitorStep extends DatabaseProperty {
|
|
|
513
539
|
this.data.kubernetesMonitor,
|
|
514
540
|
)
|
|
515
541
|
: undefined,
|
|
542
|
+
dockerMonitor: this.data.dockerMonitor
|
|
543
|
+
? MonitorStepDockerMonitorUtil.toJSON(this.data.dockerMonitor)
|
|
544
|
+
: undefined,
|
|
516
545
|
},
|
|
517
546
|
});
|
|
518
547
|
}
|
|
@@ -633,6 +662,9 @@ export default class MonitorStep extends DatabaseProperty {
|
|
|
633
662
|
kubernetesMonitor: json["kubernetesMonitor"]
|
|
634
663
|
? (json["kubernetesMonitor"] as JSONObject)
|
|
635
664
|
: undefined,
|
|
665
|
+
dockerMonitor: json["dockerMonitor"]
|
|
666
|
+
? (json["dockerMonitor"] as JSONObject)
|
|
667
|
+
: undefined,
|
|
636
668
|
}) as any;
|
|
637
669
|
|
|
638
670
|
return monitorStep;
|
|
@@ -663,6 +695,7 @@ export default class MonitorStep extends DatabaseProperty {
|
|
|
663
695
|
domainMonitor: Zod.any().optional(),
|
|
664
696
|
externalStatusPageMonitor: Zod.any().optional(),
|
|
665
697
|
kubernetesMonitor: Zod.any().optional(),
|
|
698
|
+
dockerMonitor: Zod.any().optional(),
|
|
666
699
|
}).openapi({
|
|
667
700
|
type: "object",
|
|
668
701
|
example: {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { JSONObject } from "../JSON";
|
|
2
|
+
import MetricsViewConfig from "../Metrics/MetricsViewConfig";
|
|
3
|
+
import RollingTime from "../RollingTime/RollingTime";
|
|
4
|
+
|
|
5
|
+
export interface DockerContainerFilters {
|
|
6
|
+
containerName?: string | undefined;
|
|
7
|
+
containerImage?: string | undefined;
|
|
8
|
+
hostName?: string | undefined;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default interface MonitorStepDockerMonitor {
|
|
12
|
+
hostIdentifier: string;
|
|
13
|
+
containerFilters: DockerContainerFilters;
|
|
14
|
+
metricViewConfig: MetricsViewConfig;
|
|
15
|
+
rollingTime: RollingTime;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export class MonitorStepDockerMonitorUtil {
|
|
19
|
+
public static getDefault(): MonitorStepDockerMonitor {
|
|
20
|
+
return {
|
|
21
|
+
hostIdentifier: "",
|
|
22
|
+
containerFilters: {},
|
|
23
|
+
metricViewConfig: {
|
|
24
|
+
queryConfigs: [],
|
|
25
|
+
formulaConfigs: [],
|
|
26
|
+
},
|
|
27
|
+
rollingTime: RollingTime.Past1Minute,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
public static fromJSON(json: JSONObject): MonitorStepDockerMonitor {
|
|
32
|
+
return json as any as MonitorStepDockerMonitor;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
public static toJSON(monitor: MonitorStepDockerMonitor): JSONObject {
|
|
36
|
+
return monitor as any as JSONObject;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -7,6 +7,7 @@ enum MonitorType {
|
|
|
7
7
|
API = "API",
|
|
8
8
|
Ping = "Ping",
|
|
9
9
|
Kubernetes = "Kubernetes",
|
|
10
|
+
Docker = "Docker",
|
|
10
11
|
IP = "IP",
|
|
11
12
|
IncomingRequest = "Incoming Request",
|
|
12
13
|
IncomingEmail = "Incoming Email",
|
|
@@ -88,6 +89,10 @@ export class MonitorTypeHelper {
|
|
|
88
89
|
label: "Kubernetes",
|
|
89
90
|
monitorTypes: [MonitorType.Kubernetes],
|
|
90
91
|
},
|
|
92
|
+
{
|
|
93
|
+
label: "Docker",
|
|
94
|
+
monitorTypes: [MonitorType.Docker],
|
|
95
|
+
},
|
|
91
96
|
{
|
|
92
97
|
label: "Telemetry",
|
|
93
98
|
monitorTypes: [
|
|
@@ -112,7 +117,8 @@ export class MonitorTypeHelper {
|
|
|
112
117
|
monitorType === MonitorType.Traces ||
|
|
113
118
|
monitorType === MonitorType.Exceptions ||
|
|
114
119
|
monitorType === MonitorType.Profiles ||
|
|
115
|
-
monitorType === MonitorType.Kubernetes
|
|
120
|
+
monitorType === MonitorType.Kubernetes ||
|
|
121
|
+
monitorType === MonitorType.Docker
|
|
116
122
|
);
|
|
117
123
|
}
|
|
118
124
|
|
|
@@ -157,6 +163,13 @@ export class MonitorTypeHelper {
|
|
|
157
163
|
"This monitor type lets you monitor Kubernetes clusters, workloads, nodes, and pods.",
|
|
158
164
|
icon: IconProp.Cube,
|
|
159
165
|
},
|
|
166
|
+
{
|
|
167
|
+
monitorType: MonitorType.Docker,
|
|
168
|
+
title: "Docker Container",
|
|
169
|
+
description:
|
|
170
|
+
"This monitor type lets you monitor Docker containers — CPU, memory, network, restarts, and lifecycle events.",
|
|
171
|
+
icon: IconProp.Cube,
|
|
172
|
+
},
|
|
160
173
|
{
|
|
161
174
|
monitorType: MonitorType.IP,
|
|
162
175
|
title: "IP",
|
|
@@ -349,6 +362,7 @@ export class MonitorTypeHelper {
|
|
|
349
362
|
MonitorType.Domain,
|
|
350
363
|
MonitorType.ExternalStatusPage,
|
|
351
364
|
MonitorType.Kubernetes,
|
|
365
|
+
MonitorType.Docker,
|
|
352
366
|
];
|
|
353
367
|
}
|
|
354
368
|
|
package/Types/Permission.ts
CHANGED
|
@@ -722,6 +722,11 @@ enum Permission {
|
|
|
722
722
|
EditKubernetesCluster = "EditKubernetesCluster",
|
|
723
723
|
ReadKubernetesCluster = "ReadKubernetesCluster",
|
|
724
724
|
|
|
725
|
+
CreateDockerHost = "CreateDockerHost",
|
|
726
|
+
DeleteDockerHost = "DeleteDockerHost",
|
|
727
|
+
EditDockerHost = "EditDockerHost",
|
|
728
|
+
ReadDockerHost = "ReadDockerHost",
|
|
729
|
+
|
|
725
730
|
CreateService = "CreateService",
|
|
726
731
|
DeleteService = "DeleteService",
|
|
727
732
|
EditService = "EditService",
|
|
@@ -4458,6 +4463,39 @@ export class PermissionHelper {
|
|
|
4458
4463
|
group: PermissionGroup.Telemetry,
|
|
4459
4464
|
},
|
|
4460
4465
|
|
|
4466
|
+
{
|
|
4467
|
+
permission: Permission.CreateDockerHost,
|
|
4468
|
+
title: "Create Docker Host",
|
|
4469
|
+
description: "This permission can create Docker Host in this project.",
|
|
4470
|
+
isAssignableToTenant: true,
|
|
4471
|
+
isAccessControlPermission: true,
|
|
4472
|
+
group: PermissionGroup.Telemetry,
|
|
4473
|
+
},
|
|
4474
|
+
{
|
|
4475
|
+
permission: Permission.DeleteDockerHost,
|
|
4476
|
+
title: "Delete Docker Host",
|
|
4477
|
+
description: "This permission can delete Docker Host of this project.",
|
|
4478
|
+
isAssignableToTenant: true,
|
|
4479
|
+
isAccessControlPermission: false,
|
|
4480
|
+
group: PermissionGroup.Telemetry,
|
|
4481
|
+
},
|
|
4482
|
+
{
|
|
4483
|
+
permission: Permission.EditDockerHost,
|
|
4484
|
+
title: "Edit Docker Host",
|
|
4485
|
+
description: "This permission can edit Docker Host of this project.",
|
|
4486
|
+
isAssignableToTenant: true,
|
|
4487
|
+
isAccessControlPermission: false,
|
|
4488
|
+
group: PermissionGroup.Telemetry,
|
|
4489
|
+
},
|
|
4490
|
+
{
|
|
4491
|
+
permission: Permission.ReadDockerHost,
|
|
4492
|
+
title: "Read Docker Host",
|
|
4493
|
+
description: "This permission can read Docker Host of this project.",
|
|
4494
|
+
isAssignableToTenant: true,
|
|
4495
|
+
isAccessControlPermission: false,
|
|
4496
|
+
group: PermissionGroup.Telemetry,
|
|
4497
|
+
},
|
|
4498
|
+
|
|
4461
4499
|
{
|
|
4462
4500
|
permission: Permission.CreateService,
|
|
4463
4501
|
title: "Create Service",
|
|
@@ -2784,6 +2784,93 @@ const Icon: FunctionComponent<ComponentProps> = ({
|
|
|
2784
2784
|
{spokes}
|
|
2785
2785
|
</>,
|
|
2786
2786
|
);
|
|
2787
|
+
} else if (icon === IconProp.Docker) {
|
|
2788
|
+
// Docker whale — stack of containers on top of a whale curve, matching the official logo
|
|
2789
|
+
return getSvgWrapper(
|
|
2790
|
+
<>
|
|
2791
|
+
{/* Container stack — bottom row (4 boxes) */}
|
|
2792
|
+
<rect
|
|
2793
|
+
x="3"
|
|
2794
|
+
y="10"
|
|
2795
|
+
width="3"
|
|
2796
|
+
height="3"
|
|
2797
|
+
rx="0.3"
|
|
2798
|
+
strokeLinecap="round"
|
|
2799
|
+
strokeLinejoin="round"
|
|
2800
|
+
/>
|
|
2801
|
+
<rect
|
|
2802
|
+
x="6.5"
|
|
2803
|
+
y="10"
|
|
2804
|
+
width="3"
|
|
2805
|
+
height="3"
|
|
2806
|
+
rx="0.3"
|
|
2807
|
+
strokeLinecap="round"
|
|
2808
|
+
strokeLinejoin="round"
|
|
2809
|
+
/>
|
|
2810
|
+
<rect
|
|
2811
|
+
x="10"
|
|
2812
|
+
y="10"
|
|
2813
|
+
width="3"
|
|
2814
|
+
height="3"
|
|
2815
|
+
rx="0.3"
|
|
2816
|
+
strokeLinecap="round"
|
|
2817
|
+
strokeLinejoin="round"
|
|
2818
|
+
/>
|
|
2819
|
+
<rect
|
|
2820
|
+
x="13.5"
|
|
2821
|
+
y="10"
|
|
2822
|
+
width="3"
|
|
2823
|
+
height="3"
|
|
2824
|
+
rx="0.3"
|
|
2825
|
+
strokeLinecap="round"
|
|
2826
|
+
strokeLinejoin="round"
|
|
2827
|
+
/>
|
|
2828
|
+
{/* Container stack — middle row (3 boxes) */}
|
|
2829
|
+
<rect
|
|
2830
|
+
x="6.5"
|
|
2831
|
+
y="6.5"
|
|
2832
|
+
width="3"
|
|
2833
|
+
height="3"
|
|
2834
|
+
rx="0.3"
|
|
2835
|
+
strokeLinecap="round"
|
|
2836
|
+
strokeLinejoin="round"
|
|
2837
|
+
/>
|
|
2838
|
+
<rect
|
|
2839
|
+
x="10"
|
|
2840
|
+
y="6.5"
|
|
2841
|
+
width="3"
|
|
2842
|
+
height="3"
|
|
2843
|
+
rx="0.3"
|
|
2844
|
+
strokeLinecap="round"
|
|
2845
|
+
strokeLinejoin="round"
|
|
2846
|
+
/>
|
|
2847
|
+
<rect
|
|
2848
|
+
x="13.5"
|
|
2849
|
+
y="6.5"
|
|
2850
|
+
width="3"
|
|
2851
|
+
height="3"
|
|
2852
|
+
rx="0.3"
|
|
2853
|
+
strokeLinecap="round"
|
|
2854
|
+
strokeLinejoin="round"
|
|
2855
|
+
/>
|
|
2856
|
+
{/* Container stack — top row (1 box) */}
|
|
2857
|
+
<rect
|
|
2858
|
+
x="10"
|
|
2859
|
+
y="3"
|
|
2860
|
+
width="3"
|
|
2861
|
+
height="3"
|
|
2862
|
+
rx="0.3"
|
|
2863
|
+
strokeLinecap="round"
|
|
2864
|
+
strokeLinejoin="round"
|
|
2865
|
+
/>
|
|
2866
|
+
{/* Whale curve carrying the containers */}
|
|
2867
|
+
<path
|
|
2868
|
+
strokeLinecap="round"
|
|
2869
|
+
strokeLinejoin="round"
|
|
2870
|
+
d="M2 14c1 2.5 3.5 4 7 4 5.5 0 9.5-2.5 11-7 1 0.2 2.2 0 3-0.7"
|
|
2871
|
+
/>
|
|
2872
|
+
</>,
|
|
2873
|
+
);
|
|
2787
2874
|
} else if (icon === IconProp.Gauge) {
|
|
2788
2875
|
// Gauge/speedometer icon — semicircular meter with needle
|
|
2789
2876
|
return getSvgWrapper(
|