forked from oxidecomputer/omicron
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clickhouse-admin-single.json
176 lines (176 loc) · 4.68 KB
/
clickhouse-admin-single.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
{
"openapi": "3.0.3",
"info": {
"title": "ClickHouse Single-Node Admin Server API",
"description": "API for interacting with the Oxide control plane's single-node ClickHouse database",
"contact": {
"url": "https://oxide.computer",
"email": "[email protected]"
},
"version": "0.0.1"
},
"paths": {
"/init": {
"put": {
"summary": "Idempotently initialize a single-node ClickHouse database.",
"operationId": "init_db",
"responses": {
"204": {
"description": "resource updated"
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/timeseries/{table}/{metric}/avg": {
"get": {
"summary": "Retrieve time series from the system database.",
"description": "The value of each data point is the average of all stored data points within the interval. These are internal ClickHouse metrics.",
"operationId": "system_timeseries_avg",
"parameters": [
{
"in": "path",
"name": "metric",
"description": "Name of the metric to retrieve.",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "table",
"description": "Table to query in the `system` database",
"required": true,
"schema": {
"$ref": "#/components/schemas/SystemTable"
}
},
{
"in": "query",
"name": "interval",
"description": "The interval to collect monitoring metrics in seconds. Default is 60 seconds.",
"schema": {
"type": "integer",
"format": "uint64",
"minimum": 0
}
},
{
"in": "query",
"name": "time_range",
"description": "Range of time to collect monitoring metrics in seconds. Default is 86400 seconds (24 hrs).",
"schema": {
"type": "integer",
"format": "uint64",
"minimum": 0
}
},
{
"in": "query",
"name": "timestamp_format",
"description": "Format in which each timeseries timestamp will be in. Default is UTC",
"schema": {
"$ref": "#/components/schemas/TimestampFormat"
}
}
],
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"title": "Array_of_SystemTimeSeries",
"type": "array",
"items": {
"$ref": "#/components/schemas/SystemTimeSeries"
}
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
}
},
"components": {
"schemas": {
"Error": {
"description": "Error information from a response.",
"type": "object",
"properties": {
"error_code": {
"type": "string"
},
"message": {
"type": "string"
},
"request_id": {
"type": "string"
}
},
"required": [
"message",
"request_id"
]
},
"SystemTimeSeries": {
"description": "Retrieved time series from the internal `system` database.",
"type": "object",
"properties": {
"time": {
"type": "string"
},
"value": {
"type": "number",
"format": "double"
}
},
"required": [
"time",
"value"
]
},
"SystemTable": {
"description": "Available metrics tables in the `system` database",
"type": "string",
"enum": [
"asynchronous_metric_log",
"metric_log"
]
},
"TimestampFormat": {
"description": "Which format should the timestamp be in.",
"type": "string",
"enum": [
"utc",
"unix_epoch"
]
}
},
"responses": {
"Error": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
}