@daocloud-proto/skoala 0.15.2 → 0.16.0

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.
@@ -100,6 +100,8 @@ export type Nacos = {
100
100
  version?: string
101
101
  nodeCount?: number
102
102
  healthNodeCount?: number
103
+ ipAddress?: string
104
+ consoleAddress?: string
103
105
  database?: NacosDatabase
104
106
  resources?: SkoalaApiGeneralV1alpha1Resource.ResourceRequirements
105
107
  condition?: NacosCondition[]
@@ -354,7 +354,7 @@ export class Grafana {
354
354
  return fm.fetchReq<SkoalaApiHostedV1alpha1Sentinel.GetSentinelDashGrafanaReq, SkoalaApiHostedV1alpha1Sentinel.GetSentinelDashGrafanaRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/sentinels/${req["sentinelName"]}/grafana?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "sentinelName"])}`, {...initReq, method: "GET"})
355
355
  }
356
356
  static GetAppsSentinelGrafana(req: SkoalaApiHostedV1alpha1Sentinel.GetAppsSentinelGrafanaReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Sentinel.GetAppsSentinelGrafanaRes> {
357
- return fm.fetchReq<SkoalaApiHostedV1alpha1Sentinel.GetAppsSentinelGrafanaReq, SkoalaApiHostedV1alpha1Sentinel.GetAppsSentinelGrafanaRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/sentinels/${req["sentinelName"]}/apps/${req["app"]}/grafanas/apps-sentinel?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "sentinelName", "app"])}`, {...initReq, method: "GET"})
357
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Sentinel.GetAppsSentinelGrafanaReq, SkoalaApiHostedV1alpha1Sentinel.GetAppsSentinelGrafanaRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/apps/${req["app"]}/grafana?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "app"])}`, {...initReq, method: "GET"})
358
358
  }
359
359
  static GetNacosGrafana(req: SkoalaApiHostedV1alpha1Nacos.GetNacosGrafanaReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Nacos.GetNacosGrafanaRes> {
360
360
  return fm.fetchReq<SkoalaApiHostedV1alpha1Nacos.GetNacosGrafanaReq, SkoalaApiHostedV1alpha1Nacos.GetNacosGrafanaRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/nacoses/${req["nacosName"]}/grafana?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "nacosName"])}`, {...initReq, method: "GET"})
@@ -6,6 +6,12 @@
6
6
 
7
7
  import * as InsightIoApiTypeV1alpha1Page from "../../type/v1alpha1/page.pb"
8
8
 
9
+ export enum CleanRuleType {
10
+ Clean_All = "Clean_All",
11
+ Clean_Unmatched = "Clean_Unmatched",
12
+ Clean_Specific = "Clean_Specific",
13
+ }
14
+
9
15
  export enum RuleSource {
10
16
  RULE_SOURCE_UNSPECIFIED = "RULE_SOURCE_UNSPECIFIED",
11
17
  METRIC_TPL = "METRIC_TPL",
@@ -73,7 +79,7 @@ export type RuleSummary = {
73
79
  source?: RuleSource
74
80
  expr?: string
75
81
  thresholdSymbol?: string
76
- thresholdNum?: string
82
+ thresholdNum?: number
77
83
  duration?: number
78
84
  status?: RuleStatus
79
85
  builtin?: boolean
@@ -95,7 +101,7 @@ export type Rule = {
95
101
  targetNames?: string[]
96
102
  expr?: string
97
103
  thresholdSymbol?: string
98
- thresholdNum?: string
104
+ thresholdNum?: number
99
105
  duration?: number
100
106
  severity?: Severity
101
107
  status?: RuleStatus
@@ -127,7 +133,7 @@ export type CreateRuleRequest = {
127
133
  targetNames?: string[]
128
134
  expr?: string
129
135
  thresholdSymbol?: string
130
- thresholdNum?: string
136
+ thresholdNum?: number
131
137
  duration?: number
132
138
  severity?: Severity
133
139
  notificationTemplate?: string
@@ -139,19 +145,30 @@ export type UpdateRuleRequest = {
139
145
  description?: string
140
146
  expr?: string
141
147
  thresholdSymbol?: string
142
- thresholdNum?: string
148
+ thresholdNum?: number
143
149
  duration?: number
144
150
  severity?: Severity
145
151
  notificationTemplate?: string
146
152
  annotation?: Annotation
147
153
  }
148
154
 
155
+ export type CleanRuleRequest = {
156
+ cleanType?: CleanRuleType
157
+ id?: string[]
158
+ }
159
+
160
+ export type CleanRuleResponse = {
161
+ result?: string
162
+ }
163
+
149
164
  export type ListAlertsRequest = {
150
165
  resolved?: boolean
151
166
  name?: string
152
167
  clusterName?: string
153
168
  namespace?: string
154
169
  severity?: Severity
170
+ targetType?: TargetType
171
+ targetName?: string
155
172
  page?: number
156
173
  pageSize?: number
157
174
  sorts?: string[]
@@ -247,6 +264,7 @@ export type ListTemplatesRequest = {
247
264
  page?: number
248
265
  pageSize?: number
249
266
  sorts?: string[]
267
+ exactSearch?: boolean
250
268
  }
251
269
 
252
270
  export type ListTemplatesResponse = {
@@ -285,4 +303,12 @@ export type TemplateBody = {
285
303
  wecom?: string
286
304
  dingtalk?: string
287
305
  webhook?: string
306
+ }
307
+
308
+ export type AlertHistoryRetentionPeriod = {
309
+ retentionTime?: number
310
+ }
311
+
312
+ export type CleanAlertHistoryResponse = {
313
+ num?: string
288
314
  }
@@ -52,14 +52,17 @@ export type EmailConfig = {
52
52
  }
53
53
 
54
54
  export type ListReceiversRequest = {
55
+ name?: string
55
56
  type?: ReceiverType
56
57
  page?: number
57
58
  pageSize?: number
58
59
  sorts?: string[]
60
+ exactSearch?: boolean
59
61
  }
60
62
 
61
63
  export type GetReceiversRequest = {
62
64
  name?: string
65
+ type?: ReceiverType
63
66
  }
64
67
 
65
68
  export type DeleteReceiversRequest = {
@@ -134,6 +134,10 @@ export type DownloadLogResponse = {
134
134
  url?: string
135
135
  }
136
136
 
137
+ export type ListLogFilePathsRequest = {
138
+ cluster?: string
139
+ }
140
+
137
141
  export type ListLogFilePathsResponse = {
138
142
  paths?: string[]
139
143
  }
@@ -4,6 +4,15 @@
4
4
  * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
5
  */
6
6
 
7
+ type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
8
+ type OneOf<T> =
9
+ | { [k in keyof T]?: undefined }
10
+ | (
11
+ keyof T extends infer K ?
12
+ (K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
13
+ : never)
14
+ : never);
15
+
7
16
  export enum requestStatus {
8
17
  STATUS_UNSPECIFIED = "STATUS_UNSPECIFIED",
9
18
  SUCCESS = "SUCCESS",
@@ -25,15 +34,18 @@ export type samplePair = {
25
34
  value?: string
26
35
  }
27
36
 
28
- export type PrometheusQueryRequest = {
29
- cluster?: string
37
+
38
+ type BasePrometheusQueryRequest = {
30
39
  namespace?: string
31
40
  query?: string
32
41
  time?: string
33
42
  }
34
43
 
35
- export type PrometheusQueryRangeRequest = {
36
- cluster?: string
44
+ export type PrometheusQueryRequest = BasePrometheusQueryRequest
45
+ & OneOf<{ cluster: string; clusterName: string }>
46
+
47
+
48
+ type BasePrometheusQueryRangeRequest = {
37
49
  namespace?: string
38
50
  query?: string
39
51
  start?: string
@@ -41,6 +53,9 @@ export type PrometheusQueryRangeRequest = {
41
53
  step?: number
42
54
  }
43
55
 
56
+ export type PrometheusQueryRangeRequest = BasePrometheusQueryRangeRequest
57
+ & OneOf<{ cluster: string; clusterName: string }>
58
+
44
59
  export type PrometheusQueryResult = {
45
60
  vector?: Sample[]
46
61
  }
@@ -59,12 +74,15 @@ export type BatchQueryRequestParam = {
59
74
  time?: string
60
75
  }
61
76
 
62
- export type MatchLabel = {
63
- cluster?: string
77
+
78
+ type BaseMatchLabel = {
64
79
  namespace?: string
65
80
  extraLabel?: {[key: string]: string}
66
81
  }
67
82
 
83
+ export type MatchLabel = BaseMatchLabel
84
+ & OneOf<{ cluster: string; clusterName: string }>
85
+
68
86
  export type BatchQueryRequest = {
69
87
  param?: BatchQueryRequestParam
70
88
  matchLabel?: MatchLabel
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/skoala",
3
- "version": "0.15.2",
3
+ "version": "0.16.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -5,6 +5,7 @@
5
5
  */
6
6
 
7
7
  import * as InsightIoApiTypeV1alpha1Page from "../../type/v1alpha1/page.pb"
8
+ import * as InsightIoApiResourceV1alpha1Pod from "./pod.pb"
8
9
  import * as InsightIoApiResourceV1alpha1Type from "./type.pb"
9
10
 
10
11
  export enum ClusterPhase {
@@ -51,10 +52,15 @@ export type Cluster = {
51
52
  role?: Role
52
53
  }
53
54
 
55
+ export type ListClusterRequest = {
56
+ showAllCluster?: boolean
57
+ }
58
+
54
59
  export type ListClusterSummaryRequest = {
55
60
  name?: string
56
61
  version?: string
57
62
  phase?: ClusterPhase
63
+ showAllCluster?: boolean
58
64
  page?: number
59
65
  pageSize?: number
60
66
  }
@@ -108,4 +114,17 @@ export type ListNamespacesResponse = {
108
114
  export type Namespace = {
109
115
  name?: string
110
116
  role?: Role
117
+ }
118
+
119
+ export type GetAgentSummaryRequest = {
120
+ cluster?: string
121
+ }
122
+
123
+ export type AgentSummary = {
124
+ insightAgentState?: insightAgentState
125
+ agentModuleStatus?: agentModuleStatus
126
+ }
127
+
128
+ export type agentModuleStatus = {
129
+ pods?: InsightIoApiResourceV1alpha1Pod.Pod[]
111
130
  }
@@ -67,7 +67,6 @@ export type ListContainersRequest = {
67
67
  cluster?: string
68
68
  namespace?: string
69
69
  name?: string
70
- phase?: ContainerPhase
71
70
  page?: number
72
71
  pageSize?: number
73
72
  }
@@ -27,7 +27,6 @@ export type ListServicesRequest = {
27
27
  name?: string
28
28
  page?: number
29
29
  pageSize?: number
30
- tracingEnabled?: boolean
31
30
  }
32
31
 
33
32
  export type ListServicesResponse = {
@@ -5,9 +5,19 @@
5
5
  */
6
6
 
7
7
  import * as InsightIoApiMetricV1alpha1Metric from "../../metric/v1alpha1/metric.pb"
8
+ import * as InsightIoApiTypeV1alpha1Page from "../../type/v1alpha1/page.pb"
8
9
  import * as InsightIoApiSpan_metricV1alpha1Otelspankind from "./otelspankind.pb"
9
- export type MetricsQueryBaseRequest = {
10
- cluster?: string
10
+
11
+ type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
12
+ type OneOf<T> =
13
+ | { [k in keyof T]?: undefined }
14
+ | (
15
+ keyof T extends infer K ?
16
+ (K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
17
+ : never)
18
+ : never);
19
+
20
+ type BaseMetricsQueryBaseRequest = {
11
21
  namespace?: string
12
22
  instanceName?: string
13
23
  extensionFilters?: string
@@ -20,8 +30,11 @@ export type MetricsQueryBaseRequest = {
20
30
  spanKinds?: InsightIoApiSpan_metricV1alpha1Otelspankind.SpanKind[]
21
31
  }
22
32
 
23
- export type GetApdexRequest = {
24
- cluster?: string
33
+ export type MetricsQueryBaseRequest = BaseMetricsQueryBaseRequest
34
+ & OneOf<{ cluster: string; clusterName: string }>
35
+
36
+
37
+ type BaseGetApdexRequest = {
25
38
  namespace?: string
26
39
  name?: string
27
40
  apdexThreshold?: string
@@ -30,8 +43,12 @@ export type GetApdexRequest = {
30
43
  extensionFilters?: string
31
44
  }
32
45
 
46
+ export type GetApdexRequest = BaseGetApdexRequest
47
+ & OneOf<{ cluster: string; clusterName: string }>
48
+
33
49
  export type MetricsWithOperation = {
34
50
  operationName?: string
51
+ spanKind?: InsightIoApiSpan_metricV1alpha1Otelspankind.SpanKind
35
52
  metricGroups?: MetricsGroup[]
36
53
  }
37
54
 
@@ -58,4 +75,29 @@ export type GetServiceDetailResponse = {
58
75
 
59
76
  export type GetOperationDetailResponse = {
60
77
  metrics?: MetricsWithOperation[]
78
+ }
79
+
80
+ export type GetServicesRequest = {
81
+ namespace?: string
82
+ extensionFilters?: string
83
+ endTime?: string
84
+ lookback?: string
85
+ spanKinds?: InsightIoApiSpan_metricV1alpha1Otelspankind.SpanKind[]
86
+ page?: number
87
+ pageSize?: number
88
+ sort?: string
89
+ clusterName?: string
90
+ }
91
+
92
+ export type ServiceItem = {
93
+ serviceName?: string
94
+ namespace?: string
95
+ reqRate?: number
96
+ repLatency?: number
97
+ errorRate?: number
98
+ }
99
+
100
+ export type GetServicesResponse = {
101
+ items?: ServiceItem[]
102
+ pagination?: InsightIoApiTypeV1alpha1Page.Pagination
61
103
  }
@@ -5,6 +5,15 @@
5
5
  */
6
6
 
7
7
  import * as InsightIoApiTracingV1alpha1Model from "./model.pb"
8
+
9
+ type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
10
+ type OneOf<T> =
11
+ | { [k in keyof T]?: undefined }
12
+ | (
13
+ keyof T extends infer K ?
14
+ (K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
15
+ : never)
16
+ : never);
8
17
  export type TracesResponseChunk = {
9
18
  traces?: InsightIoApiTracingV1alpha1Model.Trace[]
10
19
  }
@@ -13,7 +22,8 @@ export type SpansResponseChunk = {
13
22
  spans?: InsightIoApiTracingV1alpha1Model.Span[]
14
23
  }
15
24
 
16
- export type TraceQueryParameters = {
25
+
26
+ type BaseTraceQueryParameters = {
17
27
  serviceName?: string
18
28
  operationName?: string
19
29
  tags?: {[key: string]: string}
@@ -22,27 +32,12 @@ export type TraceQueryParameters = {
22
32
  durationMin?: string
23
33
  durationMax?: string
24
34
  limit?: number
25
- cluster?: string
26
35
  namespace?: string
27
36
  }
28
37
 
38
+ export type TraceQueryParameters = BaseTraceQueryParameters
39
+ & OneOf<{ cluster: string; clusterName: string }>
40
+
29
41
  export type FindTracesRequest = {
30
42
  query?: TraceQueryParameters
31
- }
32
-
33
- export type GetOperationsRequest = {
34
- service?: string
35
- spanKind?: string
36
- }
37
-
38
- export type Operation = {
39
- name?: string
40
- spanKind?: string
41
- }
42
-
43
- export type GetServicesRequest = {
44
- }
45
-
46
- export type GetServicesResponse = {
47
- services?: string[]
48
43
  }
@@ -3,18 +3,63 @@
3
3
  /*
4
4
  * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
5
  */
6
- export type QueryBaseRequest = {
7
- cluster?: string
6
+
7
+ import * as InsightIoApiSpan_metricV1alpha1Otelspankind from "../../span_metric/v1alpha1/otelspankind.pb"
8
+
9
+ type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
10
+ type OneOf<T> =
11
+ | { [k in keyof T]?: undefined }
12
+ | (
13
+ keyof T extends infer K ?
14
+ (K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
15
+ : never)
16
+ : never);
17
+
18
+ type BaseQueryBaseRequest = {
8
19
  namespace?: string
9
20
  serviceName?: string
21
+ spanKind?: InsightIoApiSpan_metricV1alpha1Otelspankind.SpanKind[]
22
+ start?: string
23
+ end?: string
24
+ }
25
+
26
+ export type QueryBaseRequest = BaseQueryBaseRequest
27
+ & OneOf<{ cluster: string; clusterName: string }>
28
+
29
+ export type BatchQueryBaseRequest = {
30
+ cluster?: string
31
+ namespace?: string
32
+ serviceName?: string[]
33
+ }
34
+
35
+ export type Operation = {
36
+ operation?: string
37
+ spanKind?: InsightIoApiSpan_metricV1alpha1Otelspankind.SpanKind
38
+ callsTotal?: number
10
39
  }
11
40
 
12
41
  export type OperationsQueryResponse = {
13
- operations?: string[]
42
+ operations?: Operation[]
14
43
  }
15
44
 
16
- export type TraceRequestById = {
45
+
46
+ type BaseTraceRequestById = {
17
47
  traceId?: string
18
- cluster?: string
19
48
  namespace?: string
49
+ }
50
+
51
+ export type TraceRequestById = BaseTraceRequestById
52
+ & OneOf<{ cluster: string; clusterName: string }>
53
+
54
+ export type ListServiceNamesRequest = {
55
+ clusterName?: string
56
+ namespace?: string
57
+ serviceName?: string
58
+ spanKind?: InsightIoApiSpan_metricV1alpha1Otelspankind.SpanKind[]
59
+ start?: string
60
+ end?: string
61
+ }
62
+
63
+ export type GetServiceNamesResponse = {
64
+ services?: string[]
20
65
  }