kb-cloud-client-typescript 2.4.0-alpha.123 → 2.4.0-alpha.124

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.
Files changed (225) hide show
  1. package/dist/adminapi/apis/diagnostics-api.d.ts +423 -0
  2. package/dist/adminapi/apis/diagnostics-api.d.ts.map +1 -1
  3. package/dist/adminapi/apis/diagnostics-api.js +435 -0
  4. package/dist/adminapi/apis/diagnostics-api.js.map +1 -1
  5. package/dist/adminapi/models/clickhouse-cluster-health-summary.d.ts +91 -0
  6. package/dist/adminapi/models/clickhouse-cluster-health-summary.d.ts.map +1 -0
  7. package/dist/adminapi/models/clickhouse-cluster-health-summary.js +16 -0
  8. package/dist/adminapi/models/clickhouse-cluster-health-summary.js.map +1 -0
  9. package/dist/adminapi/models/clickhouse-cluster-health.d.ts +71 -0
  10. package/dist/adminapi/models/clickhouse-cluster-health.d.ts.map +1 -0
  11. package/dist/adminapi/models/clickhouse-cluster-health.js +16 -0
  12. package/dist/adminapi/models/clickhouse-cluster-health.js.map +1 -0
  13. package/dist/adminapi/models/clickhouse-cluster-node.d.ts +109 -0
  14. package/dist/adminapi/models/clickhouse-cluster-node.d.ts.map +1 -0
  15. package/dist/adminapi/models/clickhouse-cluster-node.js +16 -0
  16. package/dist/adminapi/models/clickhouse-cluster-node.js.map +1 -0
  17. package/dist/adminapi/models/clickhouse-disk-usage.d.ts +61 -0
  18. package/dist/adminapi/models/clickhouse-disk-usage.d.ts.map +1 -0
  19. package/dist/adminapi/models/clickhouse-disk-usage.js +16 -0
  20. package/dist/adminapi/models/clickhouse-disk-usage.js.map +1 -0
  21. package/dist/adminapi/models/clickhouse-failed-query.d.ts +85 -0
  22. package/dist/adminapi/models/clickhouse-failed-query.d.ts.map +1 -0
  23. package/dist/adminapi/models/clickhouse-failed-query.js +16 -0
  24. package/dist/adminapi/models/clickhouse-failed-query.js.map +1 -0
  25. package/dist/adminapi/models/clickhouse-merge.d.ts +97 -0
  26. package/dist/adminapi/models/clickhouse-merge.d.ts.map +1 -0
  27. package/dist/adminapi/models/clickhouse-merge.js +16 -0
  28. package/dist/adminapi/models/clickhouse-merge.js.map +1 -0
  29. package/dist/adminapi/models/clickhouse-mutation.d.ts +79 -0
  30. package/dist/adminapi/models/clickhouse-mutation.d.ts.map +1 -0
  31. package/dist/adminapi/models/clickhouse-mutation.js +16 -0
  32. package/dist/adminapi/models/clickhouse-mutation.js.map +1 -0
  33. package/dist/adminapi/models/clickhouse-partition-space.d.ts +91 -0
  34. package/dist/adminapi/models/clickhouse-partition-space.d.ts.map +1 -0
  35. package/dist/adminapi/models/clickhouse-partition-space.js +16 -0
  36. package/dist/adminapi/models/clickhouse-partition-space.js.map +1 -0
  37. package/dist/adminapi/models/clickhouse-query-pattern.d.ts +91 -0
  38. package/dist/adminapi/models/clickhouse-query-pattern.d.ts.map +1 -0
  39. package/dist/adminapi/models/clickhouse-query-pattern.js +16 -0
  40. package/dist/adminapi/models/clickhouse-query-pattern.js.map +1 -0
  41. package/dist/adminapi/models/clickhouse-replica-health.d.ts +157 -0
  42. package/dist/adminapi/models/clickhouse-replica-health.d.ts.map +1 -0
  43. package/dist/adminapi/models/clickhouse-replica-health.js +16 -0
  44. package/dist/adminapi/models/clickhouse-replica-health.js.map +1 -0
  45. package/dist/adminapi/models/clickhouse-session-list.d.ts +45 -0
  46. package/dist/adminapi/models/clickhouse-session-list.d.ts.map +1 -0
  47. package/dist/adminapi/models/clickhouse-session-list.js +16 -0
  48. package/dist/adminapi/models/clickhouse-session-list.js.map +1 -0
  49. package/dist/adminapi/models/clickhouse-session.d.ts +139 -0
  50. package/dist/adminapi/models/clickhouse-session.d.ts.map +1 -0
  51. package/dist/adminapi/models/clickhouse-session.js +16 -0
  52. package/dist/adminapi/models/clickhouse-session.js.map +1 -0
  53. package/dist/adminapi/models/clickhouse-slow-query.d.ts +139 -0
  54. package/dist/adminapi/models/clickhouse-slow-query.d.ts.map +1 -0
  55. package/dist/adminapi/models/clickhouse-slow-query.js +16 -0
  56. package/dist/adminapi/models/clickhouse-slow-query.js.map +1 -0
  57. package/dist/adminapi/models/clickhouse-source.d.ts +43 -0
  58. package/dist/adminapi/models/clickhouse-source.d.ts.map +1 -0
  59. package/dist/adminapi/models/clickhouse-source.js +16 -0
  60. package/dist/adminapi/models/clickhouse-source.js.map +1 -0
  61. package/dist/adminapi/models/clickhouse-space-analysis.d.ts +79 -0
  62. package/dist/adminapi/models/clickhouse-space-analysis.d.ts.map +1 -0
  63. package/dist/adminapi/models/clickhouse-space-analysis.js +16 -0
  64. package/dist/adminapi/models/clickhouse-space-analysis.js.map +1 -0
  65. package/dist/adminapi/models/clickhouse-space-summary.d.ts +97 -0
  66. package/dist/adminapi/models/clickhouse-space-summary.d.ts.map +1 -0
  67. package/dist/adminapi/models/clickhouse-space-summary.js +16 -0
  68. package/dist/adminapi/models/clickhouse-space-summary.js.map +1 -0
  69. package/dist/adminapi/models/clickhouse-sqlanalysis-range.d.ts +43 -0
  70. package/dist/adminapi/models/clickhouse-sqlanalysis-range.d.ts.map +1 -0
  71. package/dist/adminapi/models/clickhouse-sqlanalysis-range.js +16 -0
  72. package/dist/adminapi/models/clickhouse-sqlanalysis-range.js.map +1 -0
  73. package/dist/adminapi/models/clickhouse-sqlanalysis.d.ts +85 -0
  74. package/dist/adminapi/models/clickhouse-sqlanalysis.d.ts.map +1 -0
  75. package/dist/adminapi/models/clickhouse-sqlanalysis.js +16 -0
  76. package/dist/adminapi/models/clickhouse-sqlanalysis.js.map +1 -0
  77. package/dist/adminapi/models/clickhouse-sqlsummary.d.ts +43 -0
  78. package/dist/adminapi/models/clickhouse-sqlsummary.d.ts.map +1 -0
  79. package/dist/adminapi/models/clickhouse-sqlsummary.js +16 -0
  80. package/dist/adminapi/models/clickhouse-sqlsummary.js.map +1 -0
  81. package/dist/adminapi/models/clickhouse-table-space.d.ts +104 -0
  82. package/dist/adminapi/models/clickhouse-table-space.d.ts.map +1 -0
  83. package/dist/adminapi/models/clickhouse-table-space.js +16 -0
  84. package/dist/adminapi/models/clickhouse-table-space.js.map +1 -0
  85. package/dist/adminapi/models/index.d.ts +20 -0
  86. package/dist/adminapi/models/index.d.ts.map +1 -1
  87. package/dist/adminapi/models/index.js +20 -0
  88. package/dist/adminapi/models/index.js.map +1 -1
  89. package/dist/openapi/apis/diagnostics-api.d.ts +423 -0
  90. package/dist/openapi/apis/diagnostics-api.d.ts.map +1 -1
  91. package/dist/openapi/apis/diagnostics-api.js +435 -0
  92. package/dist/openapi/apis/diagnostics-api.js.map +1 -1
  93. package/dist/openapi/models/clickhouse-cluster-health-summary.d.ts +91 -0
  94. package/dist/openapi/models/clickhouse-cluster-health-summary.d.ts.map +1 -0
  95. package/dist/openapi/models/clickhouse-cluster-health-summary.js +16 -0
  96. package/dist/openapi/models/clickhouse-cluster-health-summary.js.map +1 -0
  97. package/dist/openapi/models/clickhouse-cluster-health.d.ts +71 -0
  98. package/dist/openapi/models/clickhouse-cluster-health.d.ts.map +1 -0
  99. package/dist/openapi/models/clickhouse-cluster-health.js +16 -0
  100. package/dist/openapi/models/clickhouse-cluster-health.js.map +1 -0
  101. package/dist/openapi/models/clickhouse-cluster-node.d.ts +109 -0
  102. package/dist/openapi/models/clickhouse-cluster-node.d.ts.map +1 -0
  103. package/dist/openapi/models/clickhouse-cluster-node.js +16 -0
  104. package/dist/openapi/models/clickhouse-cluster-node.js.map +1 -0
  105. package/dist/openapi/models/clickhouse-disk-usage.d.ts +61 -0
  106. package/dist/openapi/models/clickhouse-disk-usage.d.ts.map +1 -0
  107. package/dist/openapi/models/clickhouse-disk-usage.js +16 -0
  108. package/dist/openapi/models/clickhouse-disk-usage.js.map +1 -0
  109. package/dist/openapi/models/clickhouse-failed-query.d.ts +85 -0
  110. package/dist/openapi/models/clickhouse-failed-query.d.ts.map +1 -0
  111. package/dist/openapi/models/clickhouse-failed-query.js +16 -0
  112. package/dist/openapi/models/clickhouse-failed-query.js.map +1 -0
  113. package/dist/openapi/models/clickhouse-merge.d.ts +97 -0
  114. package/dist/openapi/models/clickhouse-merge.d.ts.map +1 -0
  115. package/dist/openapi/models/clickhouse-merge.js +16 -0
  116. package/dist/openapi/models/clickhouse-merge.js.map +1 -0
  117. package/dist/openapi/models/clickhouse-mutation.d.ts +79 -0
  118. package/dist/openapi/models/clickhouse-mutation.d.ts.map +1 -0
  119. package/dist/openapi/models/clickhouse-mutation.js +16 -0
  120. package/dist/openapi/models/clickhouse-mutation.js.map +1 -0
  121. package/dist/openapi/models/clickhouse-partition-space.d.ts +91 -0
  122. package/dist/openapi/models/clickhouse-partition-space.d.ts.map +1 -0
  123. package/dist/openapi/models/clickhouse-partition-space.js +16 -0
  124. package/dist/openapi/models/clickhouse-partition-space.js.map +1 -0
  125. package/dist/openapi/models/clickhouse-query-pattern.d.ts +91 -0
  126. package/dist/openapi/models/clickhouse-query-pattern.d.ts.map +1 -0
  127. package/dist/openapi/models/clickhouse-query-pattern.js +16 -0
  128. package/dist/openapi/models/clickhouse-query-pattern.js.map +1 -0
  129. package/dist/openapi/models/clickhouse-replica-health.d.ts +157 -0
  130. package/dist/openapi/models/clickhouse-replica-health.d.ts.map +1 -0
  131. package/dist/openapi/models/clickhouse-replica-health.js +16 -0
  132. package/dist/openapi/models/clickhouse-replica-health.js.map +1 -0
  133. package/dist/openapi/models/clickhouse-session-list.d.ts +45 -0
  134. package/dist/openapi/models/clickhouse-session-list.d.ts.map +1 -0
  135. package/dist/openapi/models/clickhouse-session-list.js +16 -0
  136. package/dist/openapi/models/clickhouse-session-list.js.map +1 -0
  137. package/dist/openapi/models/clickhouse-session.d.ts +139 -0
  138. package/dist/openapi/models/clickhouse-session.d.ts.map +1 -0
  139. package/dist/openapi/models/clickhouse-session.js +16 -0
  140. package/dist/openapi/models/clickhouse-session.js.map +1 -0
  141. package/dist/openapi/models/clickhouse-slow-query.d.ts +139 -0
  142. package/dist/openapi/models/clickhouse-slow-query.d.ts.map +1 -0
  143. package/dist/openapi/models/clickhouse-slow-query.js +16 -0
  144. package/dist/openapi/models/clickhouse-slow-query.js.map +1 -0
  145. package/dist/openapi/models/clickhouse-source.d.ts +43 -0
  146. package/dist/openapi/models/clickhouse-source.d.ts.map +1 -0
  147. package/dist/openapi/models/clickhouse-source.js +16 -0
  148. package/dist/openapi/models/clickhouse-source.js.map +1 -0
  149. package/dist/openapi/models/clickhouse-space-analysis.d.ts +79 -0
  150. package/dist/openapi/models/clickhouse-space-analysis.d.ts.map +1 -0
  151. package/dist/openapi/models/clickhouse-space-analysis.js +16 -0
  152. package/dist/openapi/models/clickhouse-space-analysis.js.map +1 -0
  153. package/dist/openapi/models/clickhouse-space-summary.d.ts +97 -0
  154. package/dist/openapi/models/clickhouse-space-summary.d.ts.map +1 -0
  155. package/dist/openapi/models/clickhouse-space-summary.js +16 -0
  156. package/dist/openapi/models/clickhouse-space-summary.js.map +1 -0
  157. package/dist/openapi/models/clickhouse-sqlanalysis-range.d.ts +43 -0
  158. package/dist/openapi/models/clickhouse-sqlanalysis-range.d.ts.map +1 -0
  159. package/dist/openapi/models/clickhouse-sqlanalysis-range.js +16 -0
  160. package/dist/openapi/models/clickhouse-sqlanalysis-range.js.map +1 -0
  161. package/dist/openapi/models/clickhouse-sqlanalysis.d.ts +85 -0
  162. package/dist/openapi/models/clickhouse-sqlanalysis.d.ts.map +1 -0
  163. package/dist/openapi/models/clickhouse-sqlanalysis.js +16 -0
  164. package/dist/openapi/models/clickhouse-sqlanalysis.js.map +1 -0
  165. package/dist/openapi/models/clickhouse-sqlsummary.d.ts +43 -0
  166. package/dist/openapi/models/clickhouse-sqlsummary.d.ts.map +1 -0
  167. package/dist/openapi/models/clickhouse-sqlsummary.js +16 -0
  168. package/dist/openapi/models/clickhouse-sqlsummary.js.map +1 -0
  169. package/dist/openapi/models/clickhouse-table-space.d.ts +104 -0
  170. package/dist/openapi/models/clickhouse-table-space.d.ts.map +1 -0
  171. package/dist/openapi/models/clickhouse-table-space.js +16 -0
  172. package/dist/openapi/models/clickhouse-table-space.js.map +1 -0
  173. package/dist/openapi/models/index.d.ts +20 -0
  174. package/dist/openapi/models/index.d.ts.map +1 -1
  175. package/dist/openapi/models/index.js +20 -0
  176. package/dist/openapi/models/index.js.map +1 -1
  177. package/package.json +1 -1
  178. package/src/adminapi/.openapi-generator/FILES +20 -0
  179. package/src/adminapi/apis/diagnostics-api.ts +746 -10
  180. package/src/adminapi/models/clickhouse-cluster-health-summary.ts +96 -0
  181. package/src/adminapi/models/clickhouse-cluster-health.ts +84 -0
  182. package/src/adminapi/models/clickhouse-cluster-node.ts +114 -0
  183. package/src/adminapi/models/clickhouse-disk-usage.ts +66 -0
  184. package/src/adminapi/models/clickhouse-failed-query.ts +90 -0
  185. package/src/adminapi/models/clickhouse-merge.ts +102 -0
  186. package/src/adminapi/models/clickhouse-mutation.ts +84 -0
  187. package/src/adminapi/models/clickhouse-partition-space.ts +96 -0
  188. package/src/adminapi/models/clickhouse-query-pattern.ts +96 -0
  189. package/src/adminapi/models/clickhouse-replica-health.ts +162 -0
  190. package/src/adminapi/models/clickhouse-session-list.ts +54 -0
  191. package/src/adminapi/models/clickhouse-session.ts +144 -0
  192. package/src/adminapi/models/clickhouse-slow-query.ts +144 -0
  193. package/src/adminapi/models/clickhouse-source.ts +48 -0
  194. package/src/adminapi/models/clickhouse-space-analysis.ts +96 -0
  195. package/src/adminapi/models/clickhouse-space-summary.ts +102 -0
  196. package/src/adminapi/models/clickhouse-sqlanalysis-range.ts +48 -0
  197. package/src/adminapi/models/clickhouse-sqlanalysis.ts +102 -0
  198. package/src/adminapi/models/clickhouse-sqlsummary.ts +48 -0
  199. package/src/adminapi/models/clickhouse-table-space.ts +111 -0
  200. package/src/adminapi/models/index.ts +20 -0
  201. package/src/adminapi.yaml +1158 -0
  202. package/src/openapi/.openapi-generator/FILES +20 -0
  203. package/src/openapi/apis/diagnostics-api.ts +746 -10
  204. package/src/openapi/models/clickhouse-cluster-health-summary.ts +96 -0
  205. package/src/openapi/models/clickhouse-cluster-health.ts +84 -0
  206. package/src/openapi/models/clickhouse-cluster-node.ts +114 -0
  207. package/src/openapi/models/clickhouse-disk-usage.ts +66 -0
  208. package/src/openapi/models/clickhouse-failed-query.ts +90 -0
  209. package/src/openapi/models/clickhouse-merge.ts +102 -0
  210. package/src/openapi/models/clickhouse-mutation.ts +84 -0
  211. package/src/openapi/models/clickhouse-partition-space.ts +96 -0
  212. package/src/openapi/models/clickhouse-query-pattern.ts +96 -0
  213. package/src/openapi/models/clickhouse-replica-health.ts +162 -0
  214. package/src/openapi/models/clickhouse-session-list.ts +54 -0
  215. package/src/openapi/models/clickhouse-session.ts +144 -0
  216. package/src/openapi/models/clickhouse-slow-query.ts +144 -0
  217. package/src/openapi/models/clickhouse-source.ts +48 -0
  218. package/src/openapi/models/clickhouse-space-analysis.ts +96 -0
  219. package/src/openapi/models/clickhouse-space-summary.ts +102 -0
  220. package/src/openapi/models/clickhouse-sqlanalysis-range.ts +48 -0
  221. package/src/openapi/models/clickhouse-sqlanalysis.ts +102 -0
  222. package/src/openapi/models/clickhouse-sqlsummary.ts +48 -0
  223. package/src/openapi/models/clickhouse-table-space.ts +111 -0
  224. package/src/openapi/models/index.ts +20 -0
  225. package/src/openapi.yaml +1158 -0
@@ -24,6 +24,14 @@ import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError
24
24
  // @ts-ignore
25
25
  import type { APIErrorResponse } from '../models';
26
26
  // @ts-ignore
27
+ import type { ClickhouseClusterHealth } from '../models';
28
+ // @ts-ignore
29
+ import type { ClickhouseSQLAnalysis } from '../models';
30
+ // @ts-ignore
31
+ import type { ClickhouseSessionList } from '../models';
32
+ // @ts-ignore
33
+ import type { ClickhouseSpaceAnalysis } from '../models';
34
+ // @ts-ignore
27
35
  import type { DamengLockAnalysis } from '../models';
28
36
  // @ts-ignore
29
37
  import type { DamengSQLAnalysis } from '../models';
@@ -224,6 +232,186 @@ export const DiagnosticsApiAxiosParamCreator = function (configuration?: Configu
224
232
 
225
233
 
226
234
 
235
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
236
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
237
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
238
+
239
+ return {
240
+ url: toPathString(localVarUrlObj),
241
+ options: localVarRequestOptions,
242
+ };
243
+ },
244
+ /**
245
+ * Analyze system.replicas and system.clusters. Returns replication delay, Keeper queue backlog, readonly/session-expired replicas and shard/replica topology with per-node connection errors. Replica rows are collected through clusterAllReplicas, while the topology is read from the connected node\'s system.clusters view.
246
+ * @summary Get ClickHouse replica and cluster health
247
+ * @param {string} orgName Organization name
248
+ * @param {string} clusterName Cluster name
249
+ * @param {*} [options] Override http request option.
250
+ * @throws {RequiredError}
251
+ */
252
+ getDiagnosticsClickhouseClusterHealth: async (orgName: string, clusterName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
253
+ // verify required parameter 'orgName' is not null or undefined
254
+ assertParamExists('getDiagnosticsClickhouseClusterHealth', 'orgName', orgName)
255
+ // verify required parameter 'clusterName' is not null or undefined
256
+ assertParamExists('getDiagnosticsClickhouseClusterHealth', 'clusterName', clusterName)
257
+ const localVarPath = `/admin/v1/organizations/{orgName}/clusters/{clusterName}/diagnostics/clickhouse/clusterHealth`
258
+ .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
259
+ .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
260
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
261
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
262
+ let baseOptions;
263
+ if (configuration) {
264
+ baseOptions = configuration.baseOptions;
265
+ }
266
+
267
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
268
+ const localVarHeaderParameter = {} as any;
269
+ const localVarQueryParameter = {} as any;
270
+
271
+ // authentication BearerToken required
272
+ // http bearer authentication required
273
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
274
+
275
+ // authentication DigestAuth required
276
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
277
+
278
+
279
+
280
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
281
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
282
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
283
+
284
+ return {
285
+ url: toPathString(localVarUrlObj),
286
+ options: localVarRequestOptions,
287
+ };
288
+ },
289
+ /**
290
+ * Analyze system.query_log for the selected range. Only initial queries (is_initial_query = 1) are counted so distributed child queries are not double counted. Returns the slowest queries by query_duration_ms, query patterns grouped by normalized_query_hash, and failed queries (ExceptionWhileProcessing) with exception_code. When log_queries is disabled or system.query_log is missing, the endpoint returns status=unavailable together with guidance instead of failing.
291
+ * @summary Get ClickHouse SQL analysis
292
+ * @param {string} orgName Organization name
293
+ * @param {string} clusterName Cluster name
294
+ * @param {string} [range] Time range based on query_log event_time. Defaults to 24h. Allowed values: 1h, 6h, 24h, 7d.
295
+ * @param {number} [limit] Maximum number of entries per list. Defaults to 20 and is capped at 200.
296
+ * @param {string} [orderBy] Pattern ordering metric. Defaults to totalDuration. Allowed values: totalDuration, meanDuration, maxDuration, calls, memory, readRows, failures.
297
+ * @param {string} [database] Filter by current_database. Omit or empty &#x3D; all databases.
298
+ * @param {string} [user] Filter by ClickHouse user. Omit or empty &#x3D; all users.
299
+ * @param {*} [options] Override http request option.
300
+ * @throws {RequiredError}
301
+ */
302
+ getDiagnosticsClickhouseSQLAnalysis: async (orgName: string, clusterName: string, range?: string, limit?: number, orderBy?: string, database?: string, user?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
303
+ // verify required parameter 'orgName' is not null or undefined
304
+ assertParamExists('getDiagnosticsClickhouseSQLAnalysis', 'orgName', orgName)
305
+ // verify required parameter 'clusterName' is not null or undefined
306
+ assertParamExists('getDiagnosticsClickhouseSQLAnalysis', 'clusterName', clusterName)
307
+ const localVarPath = `/admin/v1/organizations/{orgName}/clusters/{clusterName}/diagnostics/clickhouse/sqlAnalysis`
308
+ .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
309
+ .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
310
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
311
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
312
+ let baseOptions;
313
+ if (configuration) {
314
+ baseOptions = configuration.baseOptions;
315
+ }
316
+
317
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
318
+ const localVarHeaderParameter = {} as any;
319
+ const localVarQueryParameter = {} as any;
320
+
321
+ // authentication BearerToken required
322
+ // http bearer authentication required
323
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
324
+
325
+ // authentication DigestAuth required
326
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
327
+
328
+ if (range !== undefined) {
329
+ localVarQueryParameter['range'] = range;
330
+ }
331
+
332
+ if (limit !== undefined) {
333
+ localVarQueryParameter['limit'] = limit;
334
+ }
335
+
336
+ if (orderBy !== undefined) {
337
+ localVarQueryParameter['orderBy'] = orderBy;
338
+ }
339
+
340
+ if (database !== undefined) {
341
+ localVarQueryParameter['database'] = database;
342
+ }
343
+
344
+ if (user !== undefined) {
345
+ localVarQueryParameter['user'] = user;
346
+ }
347
+
348
+
349
+
350
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
351
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
352
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
353
+
354
+ return {
355
+ url: toPathString(localVarUrlObj),
356
+ options: localVarRequestOptions,
357
+ };
358
+ },
359
+ /**
360
+ * Analyze system.parts, system.merges and system.mutations across the cluster. Returns table and partition level disk usage, compression efficiency, per-disk and per-host distribution, part explosion risk (parts_to_delay_insert / parts_to_throw_insert), running merges and unfinished mutations.
361
+ * @summary Get ClickHouse space analysis
362
+ * @param {string} orgName Organization name
363
+ * @param {string} clusterName Cluster name
364
+ * @param {string} [database] Filter by database. Omit or empty &#x3D; all databases.
365
+ * @param {number} [tableLimit] Maximum number of top tables. Defaults to 20 and is capped at 200.
366
+ * @param {number} [partitionLimit] Maximum number of top partitions. Defaults to 20 and is capped at 200.
367
+ * @param {number} [mergeLimit] Maximum number of merges and unfinished mutations. Defaults to 20 and is capped at 200.
368
+ * @param {*} [options] Override http request option.
369
+ * @throws {RequiredError}
370
+ */
371
+ getDiagnosticsClickhouseSpaceAnalysis: async (orgName: string, clusterName: string, database?: string, tableLimit?: number, partitionLimit?: number, mergeLimit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
372
+ // verify required parameter 'orgName' is not null or undefined
373
+ assertParamExists('getDiagnosticsClickhouseSpaceAnalysis', 'orgName', orgName)
374
+ // verify required parameter 'clusterName' is not null or undefined
375
+ assertParamExists('getDiagnosticsClickhouseSpaceAnalysis', 'clusterName', clusterName)
376
+ const localVarPath = `/admin/v1/organizations/{orgName}/clusters/{clusterName}/diagnostics/clickhouse/spaceAnalysis`
377
+ .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
378
+ .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
379
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
380
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
381
+ let baseOptions;
382
+ if (configuration) {
383
+ baseOptions = configuration.baseOptions;
384
+ }
385
+
386
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
387
+ const localVarHeaderParameter = {} as any;
388
+ const localVarQueryParameter = {} as any;
389
+
390
+ // authentication BearerToken required
391
+ // http bearer authentication required
392
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
393
+
394
+ // authentication DigestAuth required
395
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
396
+
397
+ if (database !== undefined) {
398
+ localVarQueryParameter['database'] = database;
399
+ }
400
+
401
+ if (tableLimit !== undefined) {
402
+ localVarQueryParameter['tableLimit'] = tableLimit;
403
+ }
404
+
405
+ if (partitionLimit !== undefined) {
406
+ localVarQueryParameter['partitionLimit'] = partitionLimit;
407
+ }
408
+
409
+ if (mergeLimit !== undefined) {
410
+ localVarQueryParameter['mergeLimit'] = mergeLimit;
411
+ }
412
+
413
+
414
+
227
415
  setSearchParams(localVarUrlObj, localVarQueryParameter);
228
416
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
229
417
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -1477,6 +1665,115 @@ export const DiagnosticsApiAxiosParamCreator = function (configuration?: Configu
1477
1665
 
1478
1666
 
1479
1667
 
1668
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1669
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1670
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1671
+
1672
+ return {
1673
+ url: toPathString(localVarUrlObj),
1674
+ options: localVarRequestOptions,
1675
+ };
1676
+ },
1677
+ /**
1678
+ * Terminate a running query by query_id. In cluster mode KILL QUERY ON CLUSTER is used so the initial query and its remote sub-queries are terminated together; otherwise KILL QUERY runs on the connected node.
1679
+ * @summary Kill a ClickHouse query
1680
+ * @param {string} orgName Organization name
1681
+ * @param {string} clusterName Cluster name
1682
+ * @param {string} queryId ClickHouse query_id to terminate.
1683
+ * @param {*} [options] Override http request option.
1684
+ * @throws {RequiredError}
1685
+ */
1686
+ killDiagnosticsClickhouseQuery: async (orgName: string, clusterName: string, queryId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1687
+ // verify required parameter 'orgName' is not null or undefined
1688
+ assertParamExists('killDiagnosticsClickhouseQuery', 'orgName', orgName)
1689
+ // verify required parameter 'clusterName' is not null or undefined
1690
+ assertParamExists('killDiagnosticsClickhouseQuery', 'clusterName', clusterName)
1691
+ // verify required parameter 'queryId' is not null or undefined
1692
+ assertParamExists('killDiagnosticsClickhouseQuery', 'queryId', queryId)
1693
+ const localVarPath = `/admin/v1/organizations/{orgName}/clusters/{clusterName}/diagnostics/clickhouse/sessions/{queryId}`
1694
+ .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
1695
+ .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)))
1696
+ .replace(`{${"queryId"}}`, encodeURIComponent(String(queryId)));
1697
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1698
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1699
+ let baseOptions;
1700
+ if (configuration) {
1701
+ baseOptions = configuration.baseOptions;
1702
+ }
1703
+
1704
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
1705
+ const localVarHeaderParameter = {} as any;
1706
+ const localVarQueryParameter = {} as any;
1707
+
1708
+ // authentication BearerToken required
1709
+ // http bearer authentication required
1710
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
1711
+
1712
+ // authentication DigestAuth required
1713
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1714
+
1715
+
1716
+
1717
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1718
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1719
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1720
+
1721
+ return {
1722
+ url: toPathString(localVarUrlObj),
1723
+ options: localVarRequestOptions,
1724
+ };
1725
+ },
1726
+ /**
1727
+ * List active queries from system.processes across every shard and replica via clusterAllReplicas. Returns elapsed time, current and peak memory usage, read/write progress and the server host for each query so long-running or memory-heavy queries can be located quickly. The diagnostics query itself is excluded from the result.
1728
+ * @summary List active ClickHouse queries
1729
+ * @param {string} orgName Organization name
1730
+ * @param {string} clusterName Cluster name
1731
+ * @param {number} [limit] Maximum number of queries to return. Defaults to 100 and is capped at 1000.
1732
+ * @param {string} [orderBy] Sort metric. Defaults to elapsed. Allowed values: elapsed, memoryUsage, memoryUsageRatio, peakMemoryUsage, readRows, readBytes.
1733
+ * @param {string} [database] Filter by current database. Omit or empty &#x3D; all databases.
1734
+ * @param {*} [options] Override http request option.
1735
+ * @throws {RequiredError}
1736
+ */
1737
+ listDiagnosticsClickhouseSessions: async (orgName: string, clusterName: string, limit?: number, orderBy?: string, database?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1738
+ // verify required parameter 'orgName' is not null or undefined
1739
+ assertParamExists('listDiagnosticsClickhouseSessions', 'orgName', orgName)
1740
+ // verify required parameter 'clusterName' is not null or undefined
1741
+ assertParamExists('listDiagnosticsClickhouseSessions', 'clusterName', clusterName)
1742
+ const localVarPath = `/admin/v1/organizations/{orgName}/clusters/{clusterName}/diagnostics/clickhouse/sessions`
1743
+ .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
1744
+ .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
1745
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1746
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1747
+ let baseOptions;
1748
+ if (configuration) {
1749
+ baseOptions = configuration.baseOptions;
1750
+ }
1751
+
1752
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1753
+ const localVarHeaderParameter = {} as any;
1754
+ const localVarQueryParameter = {} as any;
1755
+
1756
+ // authentication BearerToken required
1757
+ // http bearer authentication required
1758
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
1759
+
1760
+ // authentication DigestAuth required
1761
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1762
+
1763
+ if (limit !== undefined) {
1764
+ localVarQueryParameter['limit'] = limit;
1765
+ }
1766
+
1767
+ if (orderBy !== undefined) {
1768
+ localVarQueryParameter['orderBy'] = orderBy;
1769
+ }
1770
+
1771
+ if (database !== undefined) {
1772
+ localVarQueryParameter['database'] = database;
1773
+ }
1774
+
1775
+
1776
+
1480
1777
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1481
1778
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1482
1779
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -1835,22 +2132,73 @@ export const DiagnosticsApiFp = function(configuration?: Configuration) {
1835
2132
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1836
2133
  },
1837
2134
  /**
1838
- * Explicitly trigger a safe PostgreSQL EXPLAIN for one SQL fingerprint. The request does not accept raw SQL. DMS resolves the exact server-side parameterized SELECT statement identity independently of the ranking window, produces an estimated standard or generic plan without parameter sample values, rejects multiple statements, and never runs EXPLAIN ANALYZE or the original SQL. The plan uses current catalog statistics and the DMS connection context; it does not reconstruct the original role, search_path, session settings, parameter values, or historical actual plan.
1839
- * @summary Explain PostgreSQL SQL fingerprint
2135
+ * Explicitly trigger a safe PostgreSQL EXPLAIN for one SQL fingerprint. The request does not accept raw SQL. DMS resolves the exact server-side parameterized SELECT statement identity independently of the ranking window, produces an estimated standard or generic plan without parameter sample values, rejects multiple statements, and never runs EXPLAIN ANALYZE or the original SQL. The plan uses current catalog statistics and the DMS connection context; it does not reconstruct the original role, search_path, session settings, parameter values, or historical actual plan.
2136
+ * @summary Explain PostgreSQL SQL fingerprint
2137
+ * @param {string} orgName Organization name
2138
+ * @param {string} clusterName Cluster name
2139
+ * @param {string} queryID PostgreSQL pg_stat_statements queryid represented as a string.
2140
+ * @param {string} database Database name from the ranking row. The key is required to disambiguate the queryID. An unresolved empty name returns 422 no_explainable_sql_statement.
2141
+ * @param {string} user Database user from the ranking row. The key is required to disambiguate the queryID. An unresolved empty name returns 422 no_explainable_sql_statement.
2142
+ * @param {boolean} topLevel Top-level identity from the ranking row. Required to disambiguate the queryID on PostgreSQL versions that expose pg_stat_statements.toplevel.
2143
+ * @param {string} [fingerprint] Optional fingerprint consistency guard. Currently aligned with PostgreSQL pg_stat_statements queryid.
2144
+ * @param {*} [options] Override http request option.
2145
+ * @throws {RequiredError}
2146
+ */
2147
+ async explainDiagnosticsPostgresqlSQLFingerprint(orgName: string, clusterName: string, queryID: string, database: string, user: string, topLevel: boolean, fingerprint?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PostgresqlSQLFingerprintExplainResponse>> {
2148
+ const localVarAxiosArgs = await localVarAxiosParamCreator.explainDiagnosticsPostgresqlSQLFingerprint(orgName, clusterName, queryID, database, user, topLevel, fingerprint, options);
2149
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2150
+ const localVarOperationServerBasePath = operationServerMap['DiagnosticsApi.explainDiagnosticsPostgresqlSQLFingerprint']?.[localVarOperationServerIndex]?.url;
2151
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2152
+ },
2153
+ /**
2154
+ * Analyze system.replicas and system.clusters. Returns replication delay, Keeper queue backlog, readonly/session-expired replicas and shard/replica topology with per-node connection errors. Replica rows are collected through clusterAllReplicas, while the topology is read from the connected node\'s system.clusters view.
2155
+ * @summary Get ClickHouse replica and cluster health
2156
+ * @param {string} orgName Organization name
2157
+ * @param {string} clusterName Cluster name
2158
+ * @param {*} [options] Override http request option.
2159
+ * @throws {RequiredError}
2160
+ */
2161
+ async getDiagnosticsClickhouseClusterHealth(orgName: string, clusterName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ClickhouseClusterHealth>> {
2162
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDiagnosticsClickhouseClusterHealth(orgName, clusterName, options);
2163
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2164
+ const localVarOperationServerBasePath = operationServerMap['DiagnosticsApi.getDiagnosticsClickhouseClusterHealth']?.[localVarOperationServerIndex]?.url;
2165
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2166
+ },
2167
+ /**
2168
+ * Analyze system.query_log for the selected range. Only initial queries (is_initial_query = 1) are counted so distributed child queries are not double counted. Returns the slowest queries by query_duration_ms, query patterns grouped by normalized_query_hash, and failed queries (ExceptionWhileProcessing) with exception_code. When log_queries is disabled or system.query_log is missing, the endpoint returns status=unavailable together with guidance instead of failing.
2169
+ * @summary Get ClickHouse SQL analysis
2170
+ * @param {string} orgName Organization name
2171
+ * @param {string} clusterName Cluster name
2172
+ * @param {string} [range] Time range based on query_log event_time. Defaults to 24h. Allowed values: 1h, 6h, 24h, 7d.
2173
+ * @param {number} [limit] Maximum number of entries per list. Defaults to 20 and is capped at 200.
2174
+ * @param {string} [orderBy] Pattern ordering metric. Defaults to totalDuration. Allowed values: totalDuration, meanDuration, maxDuration, calls, memory, readRows, failures.
2175
+ * @param {string} [database] Filter by current_database. Omit or empty &#x3D; all databases.
2176
+ * @param {string} [user] Filter by ClickHouse user. Omit or empty &#x3D; all users.
2177
+ * @param {*} [options] Override http request option.
2178
+ * @throws {RequiredError}
2179
+ */
2180
+ async getDiagnosticsClickhouseSQLAnalysis(orgName: string, clusterName: string, range?: string, limit?: number, orderBy?: string, database?: string, user?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ClickhouseSQLAnalysis>> {
2181
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDiagnosticsClickhouseSQLAnalysis(orgName, clusterName, range, limit, orderBy, database, user, options);
2182
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2183
+ const localVarOperationServerBasePath = operationServerMap['DiagnosticsApi.getDiagnosticsClickhouseSQLAnalysis']?.[localVarOperationServerIndex]?.url;
2184
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2185
+ },
2186
+ /**
2187
+ * Analyze system.parts, system.merges and system.mutations across the cluster. Returns table and partition level disk usage, compression efficiency, per-disk and per-host distribution, part explosion risk (parts_to_delay_insert / parts_to_throw_insert), running merges and unfinished mutations.
2188
+ * @summary Get ClickHouse space analysis
1840
2189
  * @param {string} orgName Organization name
1841
2190
  * @param {string} clusterName Cluster name
1842
- * @param {string} queryID PostgreSQL pg_stat_statements queryid represented as a string.
1843
- * @param {string} database Database name from the ranking row. The key is required to disambiguate the queryID. An unresolved empty name returns 422 no_explainable_sql_statement.
1844
- * @param {string} user Database user from the ranking row. The key is required to disambiguate the queryID. An unresolved empty name returns 422 no_explainable_sql_statement.
1845
- * @param {boolean} topLevel Top-level identity from the ranking row. Required to disambiguate the queryID on PostgreSQL versions that expose pg_stat_statements.toplevel.
1846
- * @param {string} [fingerprint] Optional fingerprint consistency guard. Currently aligned with PostgreSQL pg_stat_statements queryid.
2191
+ * @param {string} [database] Filter by database. Omit or empty &#x3D; all databases.
2192
+ * @param {number} [tableLimit] Maximum number of top tables. Defaults to 20 and is capped at 200.
2193
+ * @param {number} [partitionLimit] Maximum number of top partitions. Defaults to 20 and is capped at 200.
2194
+ * @param {number} [mergeLimit] Maximum number of merges and unfinished mutations. Defaults to 20 and is capped at 200.
1847
2195
  * @param {*} [options] Override http request option.
1848
2196
  * @throws {RequiredError}
1849
2197
  */
1850
- async explainDiagnosticsPostgresqlSQLFingerprint(orgName: string, clusterName: string, queryID: string, database: string, user: string, topLevel: boolean, fingerprint?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PostgresqlSQLFingerprintExplainResponse>> {
1851
- const localVarAxiosArgs = await localVarAxiosParamCreator.explainDiagnosticsPostgresqlSQLFingerprint(orgName, clusterName, queryID, database, user, topLevel, fingerprint, options);
2198
+ async getDiagnosticsClickhouseSpaceAnalysis(orgName: string, clusterName: string, database?: string, tableLimit?: number, partitionLimit?: number, mergeLimit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ClickhouseSpaceAnalysis>> {
2199
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDiagnosticsClickhouseSpaceAnalysis(orgName, clusterName, database, tableLimit, partitionLimit, mergeLimit, options);
1852
2200
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1853
- const localVarOperationServerBasePath = operationServerMap['DiagnosticsApi.explainDiagnosticsPostgresqlSQLFingerprint']?.[localVarOperationServerIndex]?.url;
2201
+ const localVarOperationServerBasePath = operationServerMap['DiagnosticsApi.getDiagnosticsClickhouseSpaceAnalysis']?.[localVarOperationServerIndex]?.url;
1854
2202
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1855
2203
  },
1856
2204
  /**
@@ -2219,6 +2567,38 @@ export const DiagnosticsApiFp = function(configuration?: Configuration) {
2219
2567
  const localVarOperationServerBasePath = operationServerMap['DiagnosticsApi.getDiagnosticsPostgresqlSpaceAnalysis']?.[localVarOperationServerIndex]?.url;
2220
2568
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2221
2569
  },
2570
+ /**
2571
+ * Terminate a running query by query_id. In cluster mode KILL QUERY ON CLUSTER is used so the initial query and its remote sub-queries are terminated together; otherwise KILL QUERY runs on the connected node.
2572
+ * @summary Kill a ClickHouse query
2573
+ * @param {string} orgName Organization name
2574
+ * @param {string} clusterName Cluster name
2575
+ * @param {string} queryId ClickHouse query_id to terminate.
2576
+ * @param {*} [options] Override http request option.
2577
+ * @throws {RequiredError}
2578
+ */
2579
+ async killDiagnosticsClickhouseQuery(orgName: string, clusterName: string, queryId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
2580
+ const localVarAxiosArgs = await localVarAxiosParamCreator.killDiagnosticsClickhouseQuery(orgName, clusterName, queryId, options);
2581
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2582
+ const localVarOperationServerBasePath = operationServerMap['DiagnosticsApi.killDiagnosticsClickhouseQuery']?.[localVarOperationServerIndex]?.url;
2583
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2584
+ },
2585
+ /**
2586
+ * List active queries from system.processes across every shard and replica via clusterAllReplicas. Returns elapsed time, current and peak memory usage, read/write progress and the server host for each query so long-running or memory-heavy queries can be located quickly. The diagnostics query itself is excluded from the result.
2587
+ * @summary List active ClickHouse queries
2588
+ * @param {string} orgName Organization name
2589
+ * @param {string} clusterName Cluster name
2590
+ * @param {number} [limit] Maximum number of queries to return. Defaults to 100 and is capped at 1000.
2591
+ * @param {string} [orderBy] Sort metric. Defaults to elapsed. Allowed values: elapsed, memoryUsage, memoryUsageRatio, peakMemoryUsage, readRows, readBytes.
2592
+ * @param {string} [database] Filter by current database. Omit or empty &#x3D; all databases.
2593
+ * @param {*} [options] Override http request option.
2594
+ * @throws {RequiredError}
2595
+ */
2596
+ async listDiagnosticsClickhouseSessions(orgName: string, clusterName: string, limit?: number, orderBy?: string, database?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ClickhouseSessionList>> {
2597
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listDiagnosticsClickhouseSessions(orgName, clusterName, limit, orderBy, database, options);
2598
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2599
+ const localVarOperationServerBasePath = operationServerMap['DiagnosticsApi.listDiagnosticsClickhouseSessions']?.[localVarOperationServerIndex]?.url;
2600
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2601
+ },
2222
2602
  /**
2223
2603
  * List Dameng sessions from V$SESSIONS with lock status from V$LOCK. Returns session ID, user, state, client IP, transaction ID, lock status, SQL text, schema, duration, and more.
2224
2604
  * @summary List Dameng sessions
@@ -2343,6 +2723,36 @@ export const DiagnosticsApiFactory = function (configuration?: Configuration, ba
2343
2723
  explainDiagnosticsPostgresqlSQLFingerprint(requestParameters: DiagnosticsApiExplainDiagnosticsPostgresqlSQLFingerprintRequest, options?: RawAxiosRequestConfig): AxiosPromise<PostgresqlSQLFingerprintExplainResponse> {
2344
2724
  return localVarFp.explainDiagnosticsPostgresqlSQLFingerprint(requestParameters.orgName, requestParameters.clusterName, requestParameters.queryID, requestParameters.database, requestParameters.user, requestParameters.topLevel, requestParameters.fingerprint, options).then((request) => request(axios, basePath));
2345
2725
  },
2726
+ /**
2727
+ * Analyze system.replicas and system.clusters. Returns replication delay, Keeper queue backlog, readonly/session-expired replicas and shard/replica topology with per-node connection errors. Replica rows are collected through clusterAllReplicas, while the topology is read from the connected node\'s system.clusters view.
2728
+ * @summary Get ClickHouse replica and cluster health
2729
+ * @param {DiagnosticsApiGetDiagnosticsClickhouseClusterHealthRequest} requestParameters Request parameters.
2730
+ * @param {*} [options] Override http request option.
2731
+ * @throws {RequiredError}
2732
+ */
2733
+ getDiagnosticsClickhouseClusterHealth(requestParameters: DiagnosticsApiGetDiagnosticsClickhouseClusterHealthRequest, options?: RawAxiosRequestConfig): AxiosPromise<ClickhouseClusterHealth> {
2734
+ return localVarFp.getDiagnosticsClickhouseClusterHealth(requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(axios, basePath));
2735
+ },
2736
+ /**
2737
+ * Analyze system.query_log for the selected range. Only initial queries (is_initial_query = 1) are counted so distributed child queries are not double counted. Returns the slowest queries by query_duration_ms, query patterns grouped by normalized_query_hash, and failed queries (ExceptionWhileProcessing) with exception_code. When log_queries is disabled or system.query_log is missing, the endpoint returns status=unavailable together with guidance instead of failing.
2738
+ * @summary Get ClickHouse SQL analysis
2739
+ * @param {DiagnosticsApiGetDiagnosticsClickhouseSQLAnalysisRequest} requestParameters Request parameters.
2740
+ * @param {*} [options] Override http request option.
2741
+ * @throws {RequiredError}
2742
+ */
2743
+ getDiagnosticsClickhouseSQLAnalysis(requestParameters: DiagnosticsApiGetDiagnosticsClickhouseSQLAnalysisRequest, options?: RawAxiosRequestConfig): AxiosPromise<ClickhouseSQLAnalysis> {
2744
+ return localVarFp.getDiagnosticsClickhouseSQLAnalysis(requestParameters.orgName, requestParameters.clusterName, requestParameters.range, requestParameters.limit, requestParameters.orderBy, requestParameters.database, requestParameters.user, options).then((request) => request(axios, basePath));
2745
+ },
2746
+ /**
2747
+ * Analyze system.parts, system.merges and system.mutations across the cluster. Returns table and partition level disk usage, compression efficiency, per-disk and per-host distribution, part explosion risk (parts_to_delay_insert / parts_to_throw_insert), running merges and unfinished mutations.
2748
+ * @summary Get ClickHouse space analysis
2749
+ * @param {DiagnosticsApiGetDiagnosticsClickhouseSpaceAnalysisRequest} requestParameters Request parameters.
2750
+ * @param {*} [options] Override http request option.
2751
+ * @throws {RequiredError}
2752
+ */
2753
+ getDiagnosticsClickhouseSpaceAnalysis(requestParameters: DiagnosticsApiGetDiagnosticsClickhouseSpaceAnalysisRequest, options?: RawAxiosRequestConfig): AxiosPromise<ClickhouseSpaceAnalysis> {
2754
+ return localVarFp.getDiagnosticsClickhouseSpaceAnalysis(requestParameters.orgName, requestParameters.clusterName, requestParameters.database, requestParameters.tableLimit, requestParameters.partitionLimit, requestParameters.mergeLimit, options).then((request) => request(axios, basePath));
2755
+ },
2346
2756
  /**
2347
2757
  * Get a read-only Dameng SQL analysis snapshot from V$SYSTEM_LONG_EXEC_SQLS (long-running SQL) and V$SYSTEM_LARGE_MEM_SQLS (high-memory SQL). The response does not expose execution plans or remediation actions.
2348
2758
  * @summary Get Dameng SQL analysis
@@ -2573,6 +2983,26 @@ export const DiagnosticsApiFactory = function (configuration?: Configuration, ba
2573
2983
  getDiagnosticsPostgresqlSpaceAnalysis(requestParameters: DiagnosticsApiGetDiagnosticsPostgresqlSpaceAnalysisRequest, options?: RawAxiosRequestConfig): AxiosPromise<PostgresqlSpaceAnalysis> {
2574
2984
  return localVarFp.getDiagnosticsPostgresqlSpaceAnalysis(requestParameters.orgName, requestParameters.clusterName, requestParameters.databaseName, options).then((request) => request(axios, basePath));
2575
2985
  },
2986
+ /**
2987
+ * Terminate a running query by query_id. In cluster mode KILL QUERY ON CLUSTER is used so the initial query and its remote sub-queries are terminated together; otherwise KILL QUERY runs on the connected node.
2988
+ * @summary Kill a ClickHouse query
2989
+ * @param {DiagnosticsApiKillDiagnosticsClickhouseQueryRequest} requestParameters Request parameters.
2990
+ * @param {*} [options] Override http request option.
2991
+ * @throws {RequiredError}
2992
+ */
2993
+ killDiagnosticsClickhouseQuery(requestParameters: DiagnosticsApiKillDiagnosticsClickhouseQueryRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
2994
+ return localVarFp.killDiagnosticsClickhouseQuery(requestParameters.orgName, requestParameters.clusterName, requestParameters.queryId, options).then((request) => request(axios, basePath));
2995
+ },
2996
+ /**
2997
+ * List active queries from system.processes across every shard and replica via clusterAllReplicas. Returns elapsed time, current and peak memory usage, read/write progress and the server host for each query so long-running or memory-heavy queries can be located quickly. The diagnostics query itself is excluded from the result.
2998
+ * @summary List active ClickHouse queries
2999
+ * @param {DiagnosticsApiListDiagnosticsClickhouseSessionsRequest} requestParameters Request parameters.
3000
+ * @param {*} [options] Override http request option.
3001
+ * @throws {RequiredError}
3002
+ */
3003
+ listDiagnosticsClickhouseSessions(requestParameters: DiagnosticsApiListDiagnosticsClickhouseSessionsRequest, options?: RawAxiosRequestConfig): AxiosPromise<ClickhouseSessionList> {
3004
+ return localVarFp.listDiagnosticsClickhouseSessions(requestParameters.orgName, requestParameters.clusterName, requestParameters.limit, requestParameters.orderBy, requestParameters.database, options).then((request) => request(axios, basePath));
3005
+ },
2576
3006
  /**
2577
3007
  * List Dameng sessions from V$SESSIONS with lock status from V$LOCK. Returns session ID, user, state, client IP, transaction ID, lock status, SQL text, schema, duration, and more.
2578
3008
  * @summary List Dameng sessions
@@ -2662,6 +3092,36 @@ export interface DiagnosticsApiInterface {
2662
3092
  */
2663
3093
  explainDiagnosticsPostgresqlSQLFingerprint(requestParameters: DiagnosticsApiExplainDiagnosticsPostgresqlSQLFingerprintRequest, options?: RawAxiosRequestConfig): AxiosPromise<PostgresqlSQLFingerprintExplainResponse>;
2664
3094
 
3095
+ /**
3096
+ * Analyze system.replicas and system.clusters. Returns replication delay, Keeper queue backlog, readonly/session-expired replicas and shard/replica topology with per-node connection errors. Replica rows are collected through clusterAllReplicas, while the topology is read from the connected node\'s system.clusters view.
3097
+ * @summary Get ClickHouse replica and cluster health
3098
+ * @param {DiagnosticsApiGetDiagnosticsClickhouseClusterHealthRequest} requestParameters Request parameters.
3099
+ * @param {*} [options] Override http request option.
3100
+ * @throws {RequiredError}
3101
+ * @memberof DiagnosticsApiInterface
3102
+ */
3103
+ getDiagnosticsClickhouseClusterHealth(requestParameters: DiagnosticsApiGetDiagnosticsClickhouseClusterHealthRequest, options?: RawAxiosRequestConfig): AxiosPromise<ClickhouseClusterHealth>;
3104
+
3105
+ /**
3106
+ * Analyze system.query_log for the selected range. Only initial queries (is_initial_query = 1) are counted so distributed child queries are not double counted. Returns the slowest queries by query_duration_ms, query patterns grouped by normalized_query_hash, and failed queries (ExceptionWhileProcessing) with exception_code. When log_queries is disabled or system.query_log is missing, the endpoint returns status=unavailable together with guidance instead of failing.
3107
+ * @summary Get ClickHouse SQL analysis
3108
+ * @param {DiagnosticsApiGetDiagnosticsClickhouseSQLAnalysisRequest} requestParameters Request parameters.
3109
+ * @param {*} [options] Override http request option.
3110
+ * @throws {RequiredError}
3111
+ * @memberof DiagnosticsApiInterface
3112
+ */
3113
+ getDiagnosticsClickhouseSQLAnalysis(requestParameters: DiagnosticsApiGetDiagnosticsClickhouseSQLAnalysisRequest, options?: RawAxiosRequestConfig): AxiosPromise<ClickhouseSQLAnalysis>;
3114
+
3115
+ /**
3116
+ * Analyze system.parts, system.merges and system.mutations across the cluster. Returns table and partition level disk usage, compression efficiency, per-disk and per-host distribution, part explosion risk (parts_to_delay_insert / parts_to_throw_insert), running merges and unfinished mutations.
3117
+ * @summary Get ClickHouse space analysis
3118
+ * @param {DiagnosticsApiGetDiagnosticsClickhouseSpaceAnalysisRequest} requestParameters Request parameters.
3119
+ * @param {*} [options] Override http request option.
3120
+ * @throws {RequiredError}
3121
+ * @memberof DiagnosticsApiInterface
3122
+ */
3123
+ getDiagnosticsClickhouseSpaceAnalysis(requestParameters: DiagnosticsApiGetDiagnosticsClickhouseSpaceAnalysisRequest, options?: RawAxiosRequestConfig): AxiosPromise<ClickhouseSpaceAnalysis>;
3124
+
2665
3125
  /**
2666
3126
  * Get a read-only Dameng SQL analysis snapshot from V$SYSTEM_LONG_EXEC_SQLS (long-running SQL) and V$SYSTEM_LARGE_MEM_SQLS (high-memory SQL). The response does not expose execution plans or remediation actions.
2667
3127
  * @summary Get Dameng SQL analysis
@@ -2892,6 +3352,26 @@ export interface DiagnosticsApiInterface {
2892
3352
  */
2893
3353
  getDiagnosticsPostgresqlSpaceAnalysis(requestParameters: DiagnosticsApiGetDiagnosticsPostgresqlSpaceAnalysisRequest, options?: RawAxiosRequestConfig): AxiosPromise<PostgresqlSpaceAnalysis>;
2894
3354
 
3355
+ /**
3356
+ * Terminate a running query by query_id. In cluster mode KILL QUERY ON CLUSTER is used so the initial query and its remote sub-queries are terminated together; otherwise KILL QUERY runs on the connected node.
3357
+ * @summary Kill a ClickHouse query
3358
+ * @param {DiagnosticsApiKillDiagnosticsClickhouseQueryRequest} requestParameters Request parameters.
3359
+ * @param {*} [options] Override http request option.
3360
+ * @throws {RequiredError}
3361
+ * @memberof DiagnosticsApiInterface
3362
+ */
3363
+ killDiagnosticsClickhouseQuery(requestParameters: DiagnosticsApiKillDiagnosticsClickhouseQueryRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;
3364
+
3365
+ /**
3366
+ * List active queries from system.processes across every shard and replica via clusterAllReplicas. Returns elapsed time, current and peak memory usage, read/write progress and the server host for each query so long-running or memory-heavy queries can be located quickly. The diagnostics query itself is excluded from the result.
3367
+ * @summary List active ClickHouse queries
3368
+ * @param {DiagnosticsApiListDiagnosticsClickhouseSessionsRequest} requestParameters Request parameters.
3369
+ * @param {*} [options] Override http request option.
3370
+ * @throws {RequiredError}
3371
+ * @memberof DiagnosticsApiInterface
3372
+ */
3373
+ listDiagnosticsClickhouseSessions(requestParameters: DiagnosticsApiListDiagnosticsClickhouseSessionsRequest, options?: RawAxiosRequestConfig): AxiosPromise<ClickhouseSessionList>;
3374
+
2895
3375
  /**
2896
3376
  * List Dameng sessions from V$SESSIONS with lock status from V$LOCK. Returns session ID, user, state, client IP, transaction ID, lock status, SQL text, schema, duration, and more.
2897
3377
  * @summary List Dameng sessions
@@ -3059,6 +3539,132 @@ export interface DiagnosticsApiExplainDiagnosticsPostgresqlSQLFingerprintRequest
3059
3539
  readonly fingerprint?: string
3060
3540
  }
3061
3541
 
3542
+ /**
3543
+ * Request parameters for getDiagnosticsClickhouseClusterHealth operation in DiagnosticsApi.
3544
+ * @export
3545
+ * @interface DiagnosticsApiGetDiagnosticsClickhouseClusterHealthRequest
3546
+ */
3547
+ export interface DiagnosticsApiGetDiagnosticsClickhouseClusterHealthRequest {
3548
+ /**
3549
+ * Organization name
3550
+ * @type {string}
3551
+ * @memberof DiagnosticsApiGetDiagnosticsClickhouseClusterHealth
3552
+ */
3553
+ readonly orgName: string
3554
+
3555
+ /**
3556
+ * Cluster name
3557
+ * @type {string}
3558
+ * @memberof DiagnosticsApiGetDiagnosticsClickhouseClusterHealth
3559
+ */
3560
+ readonly clusterName: string
3561
+ }
3562
+
3563
+ /**
3564
+ * Request parameters for getDiagnosticsClickhouseSQLAnalysis operation in DiagnosticsApi.
3565
+ * @export
3566
+ * @interface DiagnosticsApiGetDiagnosticsClickhouseSQLAnalysisRequest
3567
+ */
3568
+ export interface DiagnosticsApiGetDiagnosticsClickhouseSQLAnalysisRequest {
3569
+ /**
3570
+ * Organization name
3571
+ * @type {string}
3572
+ * @memberof DiagnosticsApiGetDiagnosticsClickhouseSQLAnalysis
3573
+ */
3574
+ readonly orgName: string
3575
+
3576
+ /**
3577
+ * Cluster name
3578
+ * @type {string}
3579
+ * @memberof DiagnosticsApiGetDiagnosticsClickhouseSQLAnalysis
3580
+ */
3581
+ readonly clusterName: string
3582
+
3583
+ /**
3584
+ * Time range based on query_log event_time. Defaults to 24h. Allowed values: 1h, 6h, 24h, 7d.
3585
+ * @type {string}
3586
+ * @memberof DiagnosticsApiGetDiagnosticsClickhouseSQLAnalysis
3587
+ */
3588
+ readonly range?: string
3589
+
3590
+ /**
3591
+ * Maximum number of entries per list. Defaults to 20 and is capped at 200.
3592
+ * @type {number}
3593
+ * @memberof DiagnosticsApiGetDiagnosticsClickhouseSQLAnalysis
3594
+ */
3595
+ readonly limit?: number
3596
+
3597
+ /**
3598
+ * Pattern ordering metric. Defaults to totalDuration. Allowed values: totalDuration, meanDuration, maxDuration, calls, memory, readRows, failures.
3599
+ * @type {string}
3600
+ * @memberof DiagnosticsApiGetDiagnosticsClickhouseSQLAnalysis
3601
+ */
3602
+ readonly orderBy?: string
3603
+
3604
+ /**
3605
+ * Filter by current_database. Omit or empty &#x3D; all databases.
3606
+ * @type {string}
3607
+ * @memberof DiagnosticsApiGetDiagnosticsClickhouseSQLAnalysis
3608
+ */
3609
+ readonly database?: string
3610
+
3611
+ /**
3612
+ * Filter by ClickHouse user. Omit or empty &#x3D; all users.
3613
+ * @type {string}
3614
+ * @memberof DiagnosticsApiGetDiagnosticsClickhouseSQLAnalysis
3615
+ */
3616
+ readonly user?: string
3617
+ }
3618
+
3619
+ /**
3620
+ * Request parameters for getDiagnosticsClickhouseSpaceAnalysis operation in DiagnosticsApi.
3621
+ * @export
3622
+ * @interface DiagnosticsApiGetDiagnosticsClickhouseSpaceAnalysisRequest
3623
+ */
3624
+ export interface DiagnosticsApiGetDiagnosticsClickhouseSpaceAnalysisRequest {
3625
+ /**
3626
+ * Organization name
3627
+ * @type {string}
3628
+ * @memberof DiagnosticsApiGetDiagnosticsClickhouseSpaceAnalysis
3629
+ */
3630
+ readonly orgName: string
3631
+
3632
+ /**
3633
+ * Cluster name
3634
+ * @type {string}
3635
+ * @memberof DiagnosticsApiGetDiagnosticsClickhouseSpaceAnalysis
3636
+ */
3637
+ readonly clusterName: string
3638
+
3639
+ /**
3640
+ * Filter by database. Omit or empty &#x3D; all databases.
3641
+ * @type {string}
3642
+ * @memberof DiagnosticsApiGetDiagnosticsClickhouseSpaceAnalysis
3643
+ */
3644
+ readonly database?: string
3645
+
3646
+ /**
3647
+ * Maximum number of top tables. Defaults to 20 and is capped at 200.
3648
+ * @type {number}
3649
+ * @memberof DiagnosticsApiGetDiagnosticsClickhouseSpaceAnalysis
3650
+ */
3651
+ readonly tableLimit?: number
3652
+
3653
+ /**
3654
+ * Maximum number of top partitions. Defaults to 20 and is capped at 200.
3655
+ * @type {number}
3656
+ * @memberof DiagnosticsApiGetDiagnosticsClickhouseSpaceAnalysis
3657
+ */
3658
+ readonly partitionLimit?: number
3659
+
3660
+ /**
3661
+ * Maximum number of merges and unfinished mutations. Defaults to 20 and is capped at 200.
3662
+ * @type {number}
3663
+ * @memberof DiagnosticsApiGetDiagnosticsClickhouseSpaceAnalysis
3664
+ */
3665
+ readonly mergeLimit?: number
3666
+ }
3667
+
3062
3668
  /**
3063
3669
  * Request parameters for getDiagnosticsDamengSQLAnalysis operation in DiagnosticsApi.
3064
3670
  * @export
@@ -3850,6 +4456,76 @@ export interface DiagnosticsApiGetDiagnosticsPostgresqlSpaceAnalysisRequest {
3850
4456
  readonly databaseName?: string
3851
4457
  }
3852
4458
 
4459
+ /**
4460
+ * Request parameters for killDiagnosticsClickhouseQuery operation in DiagnosticsApi.
4461
+ * @export
4462
+ * @interface DiagnosticsApiKillDiagnosticsClickhouseQueryRequest
4463
+ */
4464
+ export interface DiagnosticsApiKillDiagnosticsClickhouseQueryRequest {
4465
+ /**
4466
+ * Organization name
4467
+ * @type {string}
4468
+ * @memberof DiagnosticsApiKillDiagnosticsClickhouseQuery
4469
+ */
4470
+ readonly orgName: string
4471
+
4472
+ /**
4473
+ * Cluster name
4474
+ * @type {string}
4475
+ * @memberof DiagnosticsApiKillDiagnosticsClickhouseQuery
4476
+ */
4477
+ readonly clusterName: string
4478
+
4479
+ /**
4480
+ * ClickHouse query_id to terminate.
4481
+ * @type {string}
4482
+ * @memberof DiagnosticsApiKillDiagnosticsClickhouseQuery
4483
+ */
4484
+ readonly queryId: string
4485
+ }
4486
+
4487
+ /**
4488
+ * Request parameters for listDiagnosticsClickhouseSessions operation in DiagnosticsApi.
4489
+ * @export
4490
+ * @interface DiagnosticsApiListDiagnosticsClickhouseSessionsRequest
4491
+ */
4492
+ export interface DiagnosticsApiListDiagnosticsClickhouseSessionsRequest {
4493
+ /**
4494
+ * Organization name
4495
+ * @type {string}
4496
+ * @memberof DiagnosticsApiListDiagnosticsClickhouseSessions
4497
+ */
4498
+ readonly orgName: string
4499
+
4500
+ /**
4501
+ * Cluster name
4502
+ * @type {string}
4503
+ * @memberof DiagnosticsApiListDiagnosticsClickhouseSessions
4504
+ */
4505
+ readonly clusterName: string
4506
+
4507
+ /**
4508
+ * Maximum number of queries to return. Defaults to 100 and is capped at 1000.
4509
+ * @type {number}
4510
+ * @memberof DiagnosticsApiListDiagnosticsClickhouseSessions
4511
+ */
4512
+ readonly limit?: number
4513
+
4514
+ /**
4515
+ * Sort metric. Defaults to elapsed. Allowed values: elapsed, memoryUsage, memoryUsageRatio, peakMemoryUsage, readRows, readBytes.
4516
+ * @type {string}
4517
+ * @memberof DiagnosticsApiListDiagnosticsClickhouseSessions
4518
+ */
4519
+ readonly orderBy?: string
4520
+
4521
+ /**
4522
+ * Filter by current database. Omit or empty &#x3D; all databases.
4523
+ * @type {string}
4524
+ * @memberof DiagnosticsApiListDiagnosticsClickhouseSessions
4525
+ */
4526
+ readonly database?: string
4527
+ }
4528
+
3853
4529
  /**
3854
4530
  * Request parameters for listDiagnosticsDamengSessions operation in DiagnosticsApi.
3855
4531
  * @export
@@ -4077,6 +4753,42 @@ export class DiagnosticsApi extends BaseAPI implements DiagnosticsApiInterface {
4077
4753
  return DiagnosticsApiFp(this.configuration).explainDiagnosticsPostgresqlSQLFingerprint(requestParameters.orgName, requestParameters.clusterName, requestParameters.queryID, requestParameters.database, requestParameters.user, requestParameters.topLevel, requestParameters.fingerprint, options).then((request) => request(this.axios, this.basePath));
4078
4754
  }
4079
4755
 
4756
+ /**
4757
+ * Analyze system.replicas and system.clusters. Returns replication delay, Keeper queue backlog, readonly/session-expired replicas and shard/replica topology with per-node connection errors. Replica rows are collected through clusterAllReplicas, while the topology is read from the connected node\'s system.clusters view.
4758
+ * @summary Get ClickHouse replica and cluster health
4759
+ * @param {DiagnosticsApiGetDiagnosticsClickhouseClusterHealthRequest} requestParameters Request parameters.
4760
+ * @param {*} [options] Override http request option.
4761
+ * @throws {RequiredError}
4762
+ * @memberof DiagnosticsApi
4763
+ */
4764
+ public getDiagnosticsClickhouseClusterHealth(requestParameters: DiagnosticsApiGetDiagnosticsClickhouseClusterHealthRequest, options?: RawAxiosRequestConfig) {
4765
+ return DiagnosticsApiFp(this.configuration).getDiagnosticsClickhouseClusterHealth(requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(this.axios, this.basePath));
4766
+ }
4767
+
4768
+ /**
4769
+ * Analyze system.query_log for the selected range. Only initial queries (is_initial_query = 1) are counted so distributed child queries are not double counted. Returns the slowest queries by query_duration_ms, query patterns grouped by normalized_query_hash, and failed queries (ExceptionWhileProcessing) with exception_code. When log_queries is disabled or system.query_log is missing, the endpoint returns status=unavailable together with guidance instead of failing.
4770
+ * @summary Get ClickHouse SQL analysis
4771
+ * @param {DiagnosticsApiGetDiagnosticsClickhouseSQLAnalysisRequest} requestParameters Request parameters.
4772
+ * @param {*} [options] Override http request option.
4773
+ * @throws {RequiredError}
4774
+ * @memberof DiagnosticsApi
4775
+ */
4776
+ public getDiagnosticsClickhouseSQLAnalysis(requestParameters: DiagnosticsApiGetDiagnosticsClickhouseSQLAnalysisRequest, options?: RawAxiosRequestConfig) {
4777
+ return DiagnosticsApiFp(this.configuration).getDiagnosticsClickhouseSQLAnalysis(requestParameters.orgName, requestParameters.clusterName, requestParameters.range, requestParameters.limit, requestParameters.orderBy, requestParameters.database, requestParameters.user, options).then((request) => request(this.axios, this.basePath));
4778
+ }
4779
+
4780
+ /**
4781
+ * Analyze system.parts, system.merges and system.mutations across the cluster. Returns table and partition level disk usage, compression efficiency, per-disk and per-host distribution, part explosion risk (parts_to_delay_insert / parts_to_throw_insert), running merges and unfinished mutations.
4782
+ * @summary Get ClickHouse space analysis
4783
+ * @param {DiagnosticsApiGetDiagnosticsClickhouseSpaceAnalysisRequest} requestParameters Request parameters.
4784
+ * @param {*} [options] Override http request option.
4785
+ * @throws {RequiredError}
4786
+ * @memberof DiagnosticsApi
4787
+ */
4788
+ public getDiagnosticsClickhouseSpaceAnalysis(requestParameters: DiagnosticsApiGetDiagnosticsClickhouseSpaceAnalysisRequest, options?: RawAxiosRequestConfig) {
4789
+ return DiagnosticsApiFp(this.configuration).getDiagnosticsClickhouseSpaceAnalysis(requestParameters.orgName, requestParameters.clusterName, requestParameters.database, requestParameters.tableLimit, requestParameters.partitionLimit, requestParameters.mergeLimit, options).then((request) => request(this.axios, this.basePath));
4790
+ }
4791
+
4080
4792
  /**
4081
4793
  * Get a read-only Dameng SQL analysis snapshot from V$SYSTEM_LONG_EXEC_SQLS (long-running SQL) and V$SYSTEM_LARGE_MEM_SQLS (high-memory SQL). The response does not expose execution plans or remediation actions.
4082
4794
  * @summary Get Dameng SQL analysis
@@ -4353,6 +5065,30 @@ export class DiagnosticsApi extends BaseAPI implements DiagnosticsApiInterface {
4353
5065
  return DiagnosticsApiFp(this.configuration).getDiagnosticsPostgresqlSpaceAnalysis(requestParameters.orgName, requestParameters.clusterName, requestParameters.databaseName, options).then((request) => request(this.axios, this.basePath));
4354
5066
  }
4355
5067
 
5068
+ /**
5069
+ * Terminate a running query by query_id. In cluster mode KILL QUERY ON CLUSTER is used so the initial query and its remote sub-queries are terminated together; otherwise KILL QUERY runs on the connected node.
5070
+ * @summary Kill a ClickHouse query
5071
+ * @param {DiagnosticsApiKillDiagnosticsClickhouseQueryRequest} requestParameters Request parameters.
5072
+ * @param {*} [options] Override http request option.
5073
+ * @throws {RequiredError}
5074
+ * @memberof DiagnosticsApi
5075
+ */
5076
+ public killDiagnosticsClickhouseQuery(requestParameters: DiagnosticsApiKillDiagnosticsClickhouseQueryRequest, options?: RawAxiosRequestConfig) {
5077
+ return DiagnosticsApiFp(this.configuration).killDiagnosticsClickhouseQuery(requestParameters.orgName, requestParameters.clusterName, requestParameters.queryId, options).then((request) => request(this.axios, this.basePath));
5078
+ }
5079
+
5080
+ /**
5081
+ * List active queries from system.processes across every shard and replica via clusterAllReplicas. Returns elapsed time, current and peak memory usage, read/write progress and the server host for each query so long-running or memory-heavy queries can be located quickly. The diagnostics query itself is excluded from the result.
5082
+ * @summary List active ClickHouse queries
5083
+ * @param {DiagnosticsApiListDiagnosticsClickhouseSessionsRequest} requestParameters Request parameters.
5084
+ * @param {*} [options] Override http request option.
5085
+ * @throws {RequiredError}
5086
+ * @memberof DiagnosticsApi
5087
+ */
5088
+ public listDiagnosticsClickhouseSessions(requestParameters: DiagnosticsApiListDiagnosticsClickhouseSessionsRequest, options?: RawAxiosRequestConfig) {
5089
+ return DiagnosticsApiFp(this.configuration).listDiagnosticsClickhouseSessions(requestParameters.orgName, requestParameters.clusterName, requestParameters.limit, requestParameters.orderBy, requestParameters.database, options).then((request) => request(this.axios, this.basePath));
5090
+ }
5091
+
4356
5092
  /**
4357
5093
  * List Dameng sessions from V$SESSIONS with lock status from V$LOCK. Returns session ID, user, state, client IP, transaction ID, lock status, SQL text, schema, duration, and more.
4358
5094
  * @summary List Dameng sessions