|
- syntax = "v1"
-
- type CreateAlertRuleReq {
- CLusterId string `json:"clusterId"`
- ClusterName string `json:"clusterName"`
- Name string `json:"name"`
- PromQL string `json:"promQL"`
- Duration string `json:"duration"`
- Annotations string `json:"annotations,optional"`
- AlertLevel string `json:"alertLevel"`
- AlertType string `json:"alertType"`
- }
-
- type DeleteAlertRuleReq {
- Id int64 `form:"id"`
- ClusterName string `form:"clusterName"`
- Name string `form:"name"`
- }
-
- type (
- AlertRulesReq {
- AlertType string `form:"alertType"`
- AdapterId string `form:"adapterId,optional"`
- ClusterId string `form:"clusterId,optional"`
- }
- AlertRulesResp {
- alertRules []AlertRule `json:"alertRules"`
- }
-
- AlertRule {
- Id int64 `json:"id"`
- ClusterName string `json:"clusterName"`
- Name string `json:"name"`
- AlertType string `json:"alertType"`
- PromQL string `json:"promQL"`
- Duration string `json:"duration"`
- Annotations string `json:"annotations"`
- AlertLevel string `json:"alertLevel"`
- }
- )
-
- type (
- nodesLoadTopReq {
- ClusterName string `form:"clusterName"`
- Metrics string `form:"metrics"`
- }
- nodesLoadTopResp {
- code int `json:"code"`
- data interface{} `json:"data"`
- msg string `json:"msg"`
- }
- )
-
- type (
- alertListReq {
- alertType string `form:"alertType"`
- adapterId string `form:"adapterId,optional"`
- clusterId string `form:"clusterId,optional"`
- }
- alertListResp {
- alertMap map[string]interface{} `json:"alertMap"`
- }
- )
-
- type SyncClusterAlertReq {
- AlertRecordsMap map[string]interface{} `json:"alertRecordsMap"`
- }
-
- type (
- taskNumReq {
- clusterId string `form:"clusterId"`
- }
- taskNumResp {
- current int `json:"current"`
- today int `json:"today"`
- history int `json:"history"`
- failed int `json:"failed"`
- }
- )
-
- type (
- adapterInfoReq {
- clusterId string `form:"clusterId"`
- }
- adapterInfoResp {
- name string `json:"name"`
- version string `json:"version"`
- }
- )
-
- type (
- scheduleSituationResp {
- nodes []NodeRegion `json:"nodes"`
- links []Link `json:"links"`
- categories []Category `json:"categories"`
- }
-
- NodeRegion {
- id string `json:"id"`
- name string `json:"name"`
- category int `json:"category"`
- value int `json:"value"`
- }
-
- Link {
- source string `json:"source"`
- target string `json:"target"`
- }
-
- Category {
- name string `json:"name"`
- }
- )
|