@daocloud-proto/insight 0.23.0 → 0.24.0-dev1
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.
|
@@ -362,20 +362,10 @@ export type PreviewRuleRequestGroup = {
|
|
|
362
362
|
targets?: string[]
|
|
363
363
|
}
|
|
364
364
|
|
|
365
|
-
export type PreviewRuleRequestAlertRule = {
|
|
366
|
-
source?: InsightIoApiAlertV1alpha1Type.RuleSource
|
|
367
|
-
expr?: string
|
|
368
|
-
thresholdSymbol?: string
|
|
369
|
-
thresholdNum?: number
|
|
370
|
-
duration?: string
|
|
371
|
-
logFilterCondition?: InsightIoApiAlertV1alpha1Type.RuleFilterCondition
|
|
372
|
-
logQueryString?: string
|
|
373
|
-
}
|
|
374
|
-
|
|
375
365
|
export type PreviewRuleRequest = {
|
|
376
366
|
params?: PreviewRuleRequestParams
|
|
377
367
|
group?: PreviewRuleRequestGroup
|
|
378
|
-
rule?:
|
|
368
|
+
rule?: CreateGroupRule
|
|
379
369
|
}
|
|
380
370
|
|
|
381
371
|
export type PreviewRuleResponse = {
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
import * as InsightIoApiAlertV1alpha1Silence from "./silence.pb"
|
|
9
|
+
export type InhibitionName = {
|
|
10
|
+
name?: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type Inhibition = {
|
|
14
|
+
id?: string
|
|
15
|
+
name?: string
|
|
16
|
+
clusterName?: string
|
|
17
|
+
namespace?: string
|
|
18
|
+
description?: string
|
|
19
|
+
sourceMatchers?: InsightIoApiAlertV1alpha1Silence.match[]
|
|
20
|
+
targetMatchers?: InsightIoApiAlertV1alpha1Silence.match[]
|
|
21
|
+
equal?: string[]
|
|
22
|
+
createAt?: string
|
|
23
|
+
updateAt?: string
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type CreateInhibitionRequest = {
|
|
27
|
+
name?: string
|
|
28
|
+
clusterName?: string
|
|
29
|
+
namespace?: string
|
|
30
|
+
description?: string
|
|
31
|
+
sourceMatchers?: InsightIoApiAlertV1alpha1Silence.match[]
|
|
32
|
+
targetMatchers?: InsightIoApiAlertV1alpha1Silence.match[]
|
|
33
|
+
equal?: string[]
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type UpdateInhibitionRequest = {
|
|
37
|
+
id?: string
|
|
38
|
+
description?: string
|
|
39
|
+
sourceMatchers?: InsightIoApiAlertV1alpha1Silence.match[]
|
|
40
|
+
targetMatchers?: InsightIoApiAlertV1alpha1Silence.match[]
|
|
41
|
+
equal?: string[]
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type ListInhibitionsRequest = {
|
|
45
|
+
name?: string
|
|
46
|
+
clusterName?: string
|
|
47
|
+
namespace?: string
|
|
48
|
+
page?: number
|
|
49
|
+
pageSize?: number
|
|
50
|
+
sorts?: string[]
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type InhibitionList = {
|
|
54
|
+
items?: Inhibition[]
|
|
55
|
+
pagination?: InsightIoApiTypeV1alpha1Page.Pagination
|
|
56
|
+
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as InsightIoApiAlertV1alpha1Alert from "../../alert/v1alpha1/alert.pb"
|
|
8
|
+
import * as InsightIoApiAlertV1alpha1Inhibition from "../../alert/v1alpha1/inhibition.pb"
|
|
8
9
|
import * as InsightIoApiAlertV1alpha1Notify from "../../alert/v1alpha1/notify.pb"
|
|
9
10
|
import * as InsightIoApiAlertV1alpha1Silence from "../../alert/v1alpha1/silence.pb"
|
|
10
11
|
import * as InsightIoApiEventV1alpha1Event from "../../event/v1alpha1/event.pb"
|
|
@@ -42,6 +43,7 @@ export enum resourceType {
|
|
|
42
43
|
systemComponents = "systemComponents",
|
|
43
44
|
systemSettings = "systemSettings",
|
|
44
45
|
netFlow = "netFlow",
|
|
46
|
+
alertInhibition = "alertInhibition",
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
export type empty = {
|
|
@@ -254,6 +256,21 @@ export class Alert {
|
|
|
254
256
|
static DeleteRuleTemplate(req: InsightIoApiAlertV1alpha1Alert.ID, initReq?: fm.InitReq): Promise<empty> {
|
|
255
257
|
return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.ID, empty>(`/apis/insight.io/v1alpha1/alert/rule-templates/${req["id"]}`, {...initReq, method: "DELETE"})
|
|
256
258
|
}
|
|
259
|
+
static ListInhibitions(req: InsightIoApiAlertV1alpha1Inhibition.ListInhibitionsRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Inhibition.InhibitionList> {
|
|
260
|
+
return fm.fetchReq<InsightIoApiAlertV1alpha1Inhibition.ListInhibitionsRequest, InsightIoApiAlertV1alpha1Inhibition.InhibitionList>(`/apis/insight.io/v1alpha1/alert/inhibitions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
261
|
+
}
|
|
262
|
+
static GetInhibition(req: InsightIoApiAlertV1alpha1Alert.ID, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Inhibition.Inhibition> {
|
|
263
|
+
return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.ID, InsightIoApiAlertV1alpha1Inhibition.Inhibition>(`/apis/insight.io/v1alpha1/alert/inhibitions/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
264
|
+
}
|
|
265
|
+
static CreateInhibition(req: InsightIoApiAlertV1alpha1Inhibition.CreateInhibitionRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Inhibition.Inhibition> {
|
|
266
|
+
return fm.fetchReq<InsightIoApiAlertV1alpha1Inhibition.CreateInhibitionRequest, InsightIoApiAlertV1alpha1Inhibition.Inhibition>(`/apis/insight.io/v1alpha1/alert/inhibitions`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
267
|
+
}
|
|
268
|
+
static UpdateInhibition(req: InsightIoApiAlertV1alpha1Inhibition.UpdateInhibitionRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Inhibition.Inhibition> {
|
|
269
|
+
return fm.fetchReq<InsightIoApiAlertV1alpha1Inhibition.UpdateInhibitionRequest, InsightIoApiAlertV1alpha1Inhibition.Inhibition>(`/apis/insight.io/v1alpha1/alert/inhibitions/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
270
|
+
}
|
|
271
|
+
static DeleteInhibition(req: InsightIoApiAlertV1alpha1Alert.ID, initReq?: fm.InitReq): Promise<empty> {
|
|
272
|
+
return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.ID, empty>(`/apis/insight.io/v1alpha1/alert/inhibitions/${req["id"]}`, {...initReq, method: "DELETE"})
|
|
273
|
+
}
|
|
257
274
|
}
|
|
258
275
|
export class Log {
|
|
259
276
|
static SearchLog(req: InsightIoApiLogV1alpha1Log.SearchLogRequest, initReq?: fm.InitReq): Promise<InsightIoApiLogV1alpha1Log.SearchLogResponse> {
|