@daocloud-proto/skoala 0.3.3-2 → 0.3.3-20

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.
@@ -0,0 +1,283 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as InsightIoApiTypeV1alpha1Page from "../../type/v1alpha1/page.pb"
8
+
9
+ export enum RuleSource {
10
+ RULE_SOURCE_UNSPECIFIED = "RULE_SOURCE_UNSPECIFIED",
11
+ metric_tpl = "metric_tpl",
12
+ promql = "promql",
13
+ log_tpl = "log_tpl",
14
+ }
15
+
16
+ export enum TargetType {
17
+ TARGET_TYPE_UNSPECIFIED = "TARGET_TYPE_UNSPECIFIED",
18
+ global = "global",
19
+ cluster = "cluster",
20
+ node = "node",
21
+ workload_deployment = "workload_deployment",
22
+ workload_statefulset = "workload_statefulset",
23
+ workload_daemonset = "workload_daemonset",
24
+ workload_cronjob = "workload_cronjob",
25
+ workload_pod = "workload_pod",
26
+ }
27
+
28
+ export enum Severity {
29
+ SEVERITY_UNSPECIFIED = "SEVERITY_UNSPECIFIED",
30
+ critical = "critical",
31
+ warning = "warning",
32
+ info = "info",
33
+ }
34
+
35
+ export enum RuleStatus {
36
+ UNSPECIFIED = "UNSPECIFIED",
37
+ firing = "firing",
38
+ enabled = "enabled",
39
+ }
40
+
41
+ export enum AlertStatus {
42
+ AlertStatus_UNSPECIFIED = "AlertStatus_UNSPECIFIED",
43
+ AlertStatus_Firing = "AlertStatus_Firing",
44
+ AlertStatus_Resolved = "AlertStatus_Resolved",
45
+ }
46
+
47
+ export type ListRulesRequest = {
48
+ builtIn?: boolean
49
+ name?: string
50
+ severity?: Severity
51
+ status?: RuleStatus
52
+ page?: number
53
+ size?: number
54
+ }
55
+
56
+ export type ListRulesResponse = {
57
+ rules?: RuleSummary[]
58
+ pagination?: InsightIoApiTypeV1alpha1Page.Page
59
+ }
60
+
61
+ export type RuleSummary = {
62
+ ruleID?: string
63
+ ruleName?: string
64
+ severity?: Severity
65
+ cluster?: string
66
+ namespace?: string
67
+ targetType?: TargetType
68
+ targetName?: string[]
69
+ source?: RuleSource
70
+ expr?: string
71
+ thresholdSymbol?: string
72
+ thresholdNum?: string
73
+ duration?: number
74
+ status?: RuleStatus
75
+ builtIn?: boolean
76
+ }
77
+
78
+ export type RuleID = {
79
+ ruleID?: string
80
+ }
81
+
82
+ export type Rule = {
83
+ ruleID?: string
84
+ ruleName?: string
85
+ ruleGroupName?: string
86
+ builtIn?: boolean
87
+ cluster?: string
88
+ namespace?: string
89
+ source?: RuleSource
90
+ targetType?: TargetType
91
+ targetName?: string[]
92
+ expr?: string
93
+ thresholdSymbol?: string
94
+ thresholdNum?: string
95
+ duration?: number
96
+ severity?: Severity
97
+ status?: RuleStatus
98
+ labels?: {[key: string]: string}
99
+ description?: string
100
+ notificationTemplate?: string
101
+ annotation?: Annotation
102
+ createAt?: string
103
+ updateAt?: string
104
+ }
105
+
106
+ export type Annotation = {
107
+ promql?: string
108
+ receivers?: AnnotationReceiver[]
109
+ }
110
+
111
+ export type AnnotationReceiver = {
112
+ type?: string
113
+ names?: string[]
114
+ }
115
+
116
+ export type CreateRuleRequest = {
117
+ ruleName?: string
118
+ description?: string
119
+ cluster?: string
120
+ namespace?: string
121
+ source?: RuleSource
122
+ targetType?: TargetType
123
+ targetName?: string[]
124
+ expr?: string
125
+ thresholdSymbol?: string
126
+ thresholdNum?: string
127
+ duration?: number
128
+ severity?: Severity
129
+ notificationTemplate?: string
130
+ annotation?: Annotation
131
+ }
132
+
133
+ export type UpdateRuleRequest = {
134
+ ruleID?: string
135
+ description?: string
136
+ cluster?: string
137
+ namespace?: string
138
+ targetName?: string[]
139
+ expr?: string
140
+ thresholdSymbol?: string
141
+ thresholdNum?: string
142
+ duration?: number
143
+ severity?: Severity
144
+ notificationTemplate?: string
145
+ annotation?: Annotation
146
+ }
147
+
148
+ export type ListAlertsRequest = {
149
+ resolved?: boolean
150
+ name?: string
151
+ cluster?: string
152
+ namespace?: string
153
+ severity?: Severity
154
+ page?: number
155
+ size?: number
156
+ }
157
+
158
+ export type ListAlertsResponse = {
159
+ alerts?: AlertSummary[]
160
+ pagination?: InsightIoApiTypeV1alpha1Page.Page
161
+ }
162
+
163
+ export type AlertSummary = {
164
+ alertID?: string
165
+ ruleName?: string
166
+ severity?: Severity
167
+ cluster?: string
168
+ namespace?: string
169
+ targetType?: TargetType
170
+ targetName?: string
171
+ status?: AlertStatus
172
+ description?: string
173
+ startAt?: string
174
+ updateAt?: string
175
+ notifyResponse?: string
176
+ }
177
+
178
+ export type AlertInfo = {
179
+ alertID?: string
180
+ fingerprint?: string
181
+ ruleName?: string
182
+ ruleID?: string
183
+ cluster?: string
184
+ namespace?: string
185
+ targetType?: TargetType
186
+ targetName?: string
187
+ severity?: Severity
188
+ labels?: {[key: string]: string}
189
+ description?: string
190
+ notifyResponse?: string
191
+ annotation?: string
192
+ source?: RuleSource
193
+ status?: AlertStatus
194
+ startAt?: string
195
+ updateAt?: string
196
+ }
197
+
198
+ export type CountAlertRequest = {
199
+ resolved?: boolean
200
+ start?: string
201
+ end?: string
202
+ step?: string
203
+ }
204
+
205
+ export type CountAlertResponse = {
206
+ data?: CountAlert[]
207
+ }
208
+
209
+ export type CountAlert = {
210
+ start?: string
211
+ end?: string
212
+ count?: {[key: string]: string}
213
+ }
214
+
215
+ export type ResolveAlertRequest = {
216
+ alertID?: string[]
217
+ }
218
+
219
+ export type AMHookRequest = {
220
+ version?: string
221
+ groupKey?: string
222
+ status?: string
223
+ receiver?: string
224
+ groupLabels?: {[key: string]: string}
225
+ commonLabels?: {[key: string]: string}
226
+ commonAnnotations?: {[key: string]: string}
227
+ externalURL?: string
228
+ alerts?: AmAlert[]
229
+ }
230
+
231
+ export type AmAlert = {
232
+ status?: string
233
+ labels?: {[key: string]: string}
234
+ annotations?: {[key: string]: string}
235
+ startsAt?: string
236
+ endsAt?: string
237
+ generatorURL?: string
238
+ fingerprint?: string
239
+ }
240
+
241
+ export type ListTemplatesRequest = {
242
+ name?: string
243
+ page?: number
244
+ size?: number
245
+ }
246
+
247
+ export type ListTemplatesResponse = {
248
+ templates?: TemplateSummary[]
249
+ pagination?: InsightIoApiTypeV1alpha1Page.Page
250
+ }
251
+
252
+ export type TemplateSummary = {
253
+ name?: string
254
+ description?: string
255
+ updateAt?: string
256
+ builtin?: boolean
257
+ }
258
+
259
+ export type Template = {
260
+ name?: string
261
+ description?: string
262
+ body?: TemplateBody
263
+ builtin?: boolean
264
+ createAt?: string
265
+ updateAt?: string
266
+ }
267
+
268
+ export type TemplateName = {
269
+ name?: string
270
+ }
271
+
272
+ export type CreateTemplateRequest = {
273
+ name?: string
274
+ description?: string
275
+ body?: TemplateBody
276
+ }
277
+
278
+ export type TemplateBody = {
279
+ email?: string
280
+ wechat?: string
281
+ dingding?: string
282
+ webhook?: string
283
+ }
@@ -0,0 +1,75 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as InsightIoApiTypeV1alpha1Page from "../../type/v1alpha1/page.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
+ export enum ReceiverType {
19
+ RECEIVER_TYPE_UNSPECIFIED = "RECEIVER_TYPE_UNSPECIFIED",
20
+ webhook = "webhook",
21
+ email = "email",
22
+ dingtalk = "dingtalk",
23
+ wechat = "wechat",
24
+ }
25
+
26
+
27
+ type BaseReceiver = {
28
+ receiverId?: string
29
+ name?: string
30
+ type?: ReceiverType
31
+ createAt?: string
32
+ updateAt?: string
33
+ }
34
+
35
+ export type Receiver = BaseReceiver
36
+ & OneOf<{ webhook: WebhookConfig }>
37
+
38
+ export type WebhookConfig = {
39
+ url?: string
40
+ httpConfig?: HTTPConfig
41
+ }
42
+
43
+ export type ListReceiversRequest = {
44
+ type?: ReceiverType
45
+ page?: number
46
+ size?: number
47
+ }
48
+
49
+ export type ReceiverId = {
50
+ receiverId?: string
51
+ }
52
+
53
+ export type ReceiverDataResponse = {
54
+ data?: Receiver
55
+ }
56
+
57
+ export type ReceiverListResponse = {
58
+ receivers?: Receiver[]
59
+ pagination?: InsightIoApiTypeV1alpha1Page.Page
60
+ }
61
+
62
+ export type HTTPConfig = {
63
+ basicAuth?: BasicAuth
64
+ bearerToken?: string
65
+ tlsConfig?: SafeTLSConfig
66
+ }
67
+
68
+ export type BasicAuth = {
69
+ username?: string
70
+ password?: string
71
+ }
72
+
73
+ export type SafeTLSConfig = {
74
+ insecureSkipVerify?: boolean
75
+ }
@@ -0,0 +1,103 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
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
+ export type LogQueryResourceFilter = {
16
+ logSearch?: string[]
17
+ clusterFilter?: string[]
18
+ namespaceFilter?: string[]
19
+ workloadSearch?: string[]
20
+ workloadFilter?: string[]
21
+ podSearch?: string[]
22
+ podFilter?: string[]
23
+ containerSearch?: string[]
24
+ containerFilter?: string[]
25
+ }
26
+
27
+ export type LogQuerySystemFilter = {
28
+ logSearch?: string[]
29
+ clusterFilter?: string[]
30
+ nodeFilter?: string[]
31
+ fileFilter?: string[]
32
+ }
33
+
34
+ export type LogQueryEventFilter = {
35
+ logSearch?: string[]
36
+ clusterFilter?: string[]
37
+ }
38
+
39
+
40
+ type BaseLogQueryRequest = {
41
+ startTime?: string
42
+ endTime?: string
43
+ from?: number
44
+ size?: number
45
+ sort?: string
46
+ interval?: string
47
+ }
48
+
49
+ export type LogQueryRequest = BaseLogQueryRequest
50
+ & OneOf<{ resource: LogQueryResourceFilter; system: LogQuerySystemFilter; event: LogQueryEventFilter }>
51
+
52
+ export type LogContextResourceFilter = {
53
+ cluster?: string
54
+ pod?: string
55
+ container?: string
56
+ }
57
+
58
+ export type LogContextSystemFilter = {
59
+ cluster?: string
60
+ node?: string
61
+ file?: string
62
+ }
63
+
64
+ export type LogContextEventFilter = {
65
+ cluster?: string
66
+ }
67
+
68
+
69
+ type BaseLogContextRequest = {
70
+ startTime?: string
71
+ endTime?: string
72
+ before?: number
73
+ after?: number
74
+ nanotimestamp?: string
75
+ }
76
+
77
+ export type LogContextRequest = BaseLogContextRequest
78
+ & OneOf<{ resource: LogContextResourceFilter; system: LogContextSystemFilter; event: LogContextEventFilter }>
79
+
80
+ export type LogQueryResult = {
81
+ log?: string
82
+ timestamp?: string
83
+ labels?: {[key: string]: string}
84
+ }
85
+
86
+ export type LogQueryResponse = {
87
+ total?: string
88
+ data?: LogQueryResult[]
89
+ }
90
+
91
+ export type LogHistogramResponse = {
92
+ total?: string
93
+ data?: LogHistogramResult[]
94
+ }
95
+
96
+ export type LogHistogramResult = {
97
+ timestamp?: string
98
+ count?: string
99
+ }
100
+
101
+ export type ListLogFilePathsResponse = {
102
+ paths?: string[]
103
+ }
@@ -0,0 +1,98 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ export enum requestStatus {
8
+ STATUS_UNSPECIFIED = "STATUS_UNSPECIFIED",
9
+ SUCCESS = "SUCCESS",
10
+ FAIL = "FAIL",
11
+ }
12
+
13
+ export type Sample = {
14
+ metric?: {[key: string]: string}
15
+ values?: samplePair
16
+ }
17
+
18
+ export type SampleStream = {
19
+ metric?: {[key: string]: string}
20
+ values?: samplePair[]
21
+ }
22
+
23
+ export type samplePair = {
24
+ timestamp?: string
25
+ value?: string
26
+ }
27
+
28
+ export type PrometheusQueryRequest = {
29
+ cluster?: string
30
+ namespace?: string
31
+ query?: string
32
+ time?: string
33
+ }
34
+
35
+ export type PrometheusQueryRangeRequest = {
36
+ cluster?: string
37
+ namespace?: string
38
+ query?: string
39
+ start?: string
40
+ end?: string
41
+ step?: number
42
+ }
43
+
44
+ export type PrometheusQueryResult = {
45
+ vector?: Sample[]
46
+ }
47
+
48
+ export type PrometheusQueryRangeResult = {
49
+ matrix?: SampleStream[]
50
+ }
51
+
52
+ export type BatchQueryRangeRequestParam = {
53
+ start?: string
54
+ end?: string
55
+ step?: number
56
+ }
57
+
58
+ export type BatchQueryRequestParam = {
59
+ time?: string
60
+ }
61
+
62
+ export type MatchLabel = {
63
+ cluster?: string
64
+ namespace?: string
65
+ extraLabel?: {[key: string]: string}
66
+ }
67
+
68
+ export type BatchQueryRequest = {
69
+ param?: BatchQueryRequestParam
70
+ matchLabels?: MatchLabel
71
+ queryList?: string[]
72
+ }
73
+
74
+ export type BatchQueryResponse = {
75
+ data?: BatchQueryResult[]
76
+ }
77
+
78
+ export type BatchQueryResult = {
79
+ data?: PrometheusQueryResult
80
+ status?: requestStatus
81
+ errorMessage?: string
82
+ }
83
+
84
+ export type BatchQueryRangeRequest = {
85
+ param?: BatchQueryRangeRequestParam
86
+ matchLabels?: MatchLabel
87
+ queryList?: string[]
88
+ }
89
+
90
+ export type BatchQueryRangeResponse = {
91
+ data?: BatchQueryRangeResult[]
92
+ }
93
+
94
+ export type BatchQueryRangeResult = {
95
+ data?: PrometheusQueryRangeResult
96
+ status?: requestStatus
97
+ errorMessage?: string
98
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/skoala",
3
- "version": "0.3.3-2",
3
+ "version": "0.3.3-20",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,96 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as InsightIoApiMetricV1alpha1Metric from "../../metric/v1alpha1/metric.pb"
8
+ import * as InsightIoApiTypeV1alpha1Page from "../../type/v1alpha1/page.pb"
9
+ import * as InsightIoApiResourceV1alpha1Type from "./type.pb"
10
+
11
+ export enum ClusterPhase {
12
+ CLUSTER_PHASE_UNSPECIFIED = "CLUSTER_PHASE_UNSPECIFIED",
13
+ UNKNOWN = "UNKNOWN",
14
+ CREATING = "CREATING",
15
+ RUNNING = "RUNNING",
16
+ UPDATING = "UPDATING",
17
+ DELETING = "DELETING",
18
+ }
19
+
20
+ export enum ClusterProvider {
21
+ GENERIC = "GENERIC",
22
+ DAOCLOUD_KUBESPRAY = "DAOCLOUD_KUBESPRAY",
23
+ DAOCLOUD_CLUSTER_API = "DAOCLOUD_CLUSTER_API",
24
+ DAOCLOUD_DCE4 = "DAOCLOUD_DCE4",
25
+ REDHAT_OPENSHIFT4 = "REDHAT_OPENSHIFT4",
26
+ SUSE_RANCHER = "SUSE_RANCHER",
27
+ VMWARE_TANZU = "VMWARE_TANZU",
28
+ AWS_EKS = "AWS_EKS",
29
+ ALIYUN_ACK = "ALIYUN_ACK",
30
+ }
31
+
32
+ export enum InsightAgentStatus {
33
+ NOT_INSTALLED = "NOT_INSTALLED",
34
+ HEALTHY = "HEALTHY",
35
+ UNHEALTHY = "UNHEALTHY",
36
+ }
37
+
38
+ export type ListClustersResponse = {
39
+ cluster?: Cluster[]
40
+ }
41
+
42
+ export type Cluster = {
43
+ name?: string
44
+ kubeSystemID?: string
45
+ phase?: ClusterPhase
46
+ }
47
+
48
+ export type ListClusterSummaryRequest = {
49
+ name?: string
50
+ page?: number
51
+ size?: number
52
+ version?: string
53
+ phases?: string[]
54
+ labels?: {[key: string]: string}
55
+ annotations?: {[key: string]: string}
56
+ sortBy?: InsightIoApiTypeV1alpha1Page.SortBy
57
+ orderBy?: InsightIoApiTypeV1alpha1Page.OrderBy
58
+ }
59
+
60
+ export type ListClusterSummaryResponse = {
61
+ clusterSummary?: GetClusterSummary[]
62
+ pagination?: InsightIoApiTypeV1alpha1Page.Page
63
+ }
64
+
65
+ export type GetClusterRequest = {
66
+ name?: string
67
+ }
68
+
69
+ export type GetClusterResponse = {
70
+ clusterResponse?: GetClusterSummary
71
+ }
72
+
73
+ export type GetClusterSummary = {
74
+ name?: string
75
+ phase?: ClusterPhase
76
+ provider?: ClusterProvider
77
+ kubernetesVersion?: string
78
+ creationTimestamp?: string
79
+ nodeNumSummary?: InsightIoApiResourceV1alpha1Type.ResourceNumSummary
80
+ podNumSummary?: InsightIoApiResourceV1alpha1Type.ResourceNumSummary
81
+ insightAgentStatus?: InsightAgentStatus
82
+ cpuUsage?: InsightIoApiMetricV1alpha1Metric.samplePair[]
83
+ memoryUsage?: InsightIoApiMetricV1alpha1Metric.samplePair[]
84
+ }
85
+
86
+ export type ListNamespacesRequest = {
87
+ cluster?: string
88
+ }
89
+
90
+ export type ListNamespacesResponse = {
91
+ namespace?: Namespace[]
92
+ }
93
+
94
+ export type Namespace = {
95
+ name?: string
96
+ }