bcm

package
v0.9.209 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GetMetricDataPath userId - scope - metricName
	GetMetricDataPath = "/json-api/v1/metricdata/%s/%s/%s"
	// BatchMetricDataPath userId - scope
	BatchMetricDataPath             = "/json-api/v1/metricdata/metricName/%s/%s"
	CreateNamespacePath             = "/csm/api/v1/userId/%s/custom/namespaces/create"
	BatchDeleteNamespacesPath       = "/csm/api/v1/userId/%s/custom/namespaces/delete"
	UpdateNamespacePath             = "/csm/api/v1/userId/%s/custom/namespaces/update"
	ListNamespacesPath              = "/csm/api/v1/userId/%s/custom/namespaces/list"
	CreateNamespaceMetricPath       = "/csm/api/v1/userId/%s/custom/namespaces/%s/metrics/create"
	BatchDeleteNamespaceMetricsPath = "/csm/api/v1/userId/%s/custom/namespaces/%s/metrics/delete"
	UpdateNamespaceMetricPath       = "/csm/api/v1/userId/%s/custom/namespaces/%s/metrics/%s"
	ListNamespaceMetricsPath        = "/csm/api/v1/userId/%s/custom/namespaces/metrics"
	GetCustomMetricPath             = "/csm/api/v1/userId/%s/custom/namespaces/%s/metrics/%s"
	CreateNamespaceEventPath        = "/csm/api/v1/custom/event/configs/create"
	BatchDeleteNamespaceEventsPath  = "/csm/api/v1/custom/event/configs/delete"
	UpdateNamespaceEventPath        = "/csm/api/v1/custom/event/configs/update"
	ListNamespaceEventsPath         = "/csm/api/v1/custom/event/configs/list"
	GetCustomEventPath              = "/csm/api/v1/custom/event/configs/detail"

	GetAlarmListPath   = "/ah-api/v1/alarmhouse/alarm/list"
	GetAlarmDetailPath = "/ah-api/v1/alarmhouse/alarm"

	ApplicationInfoPath                 = "/csm/api/v1/userId/%s/application"
	ApplicationInstanceListPath         = "/csm/api/v1/userId/%s/instances/all"
	ApplicationInstanceCreatePath       = "/csm/api/v1/userId/%s/application/instance/bind"
	ApplicationInstanceCreatedListPath  = "/csm/api/v1/userId/%s/application/%s/instance/list"
	ApplicationInstanceDeletePath       = "/csm/api/v1/userId/%s/application/instance"
	ApplicationMonitorTaskCreatePath    = "/csm/api/v1/userId/%s/application/task/create"
	ApplicationMonitorTaskDetailPath    = "/csm/api/v1/userId/%s/application/%s/task/%s"
	ApplicationMonitorTaskListPath      = "/csm/api/v1/userId/%s/application/%s/task/list"
	ApplicationMonitorTaskDeletePath    = "/csm/api/v1/userId/%s/application/task/delete"
	ApplicationMonitorTaskUpdatePath    = "/csm/api/v1/userId/%s/application/task/update"
	ApplicationDimensionTableCreatePath = "/csm/api/v1/userId/%s/application/dimensionMap/create"
	ApplicationDimensionTableListPath   = "/csm/api/v1/userId/%s/application/%s/dimensionMap/list"
	ApplicationDimensionTableDeletePath = "/csm/api/v1/userId/%s/application/dimensionMap/delete"
	ApplicationDimensionTableUpdatePath = "/csm/api/v1/userId/%s/application/dimensionMap/update"

	EventCloudListPath    = "/event-api/v1/bce-event/list"
	EventPlatformListPath = "/event-api/v1/platform-event/list"
	EventPolicyPath       = "/event-api/v1/accounts/%s/services/%s/alarm-policies"

	InstanceGroupPath     = "/csm/api/v1/userId/%s/instance-group"
	InstanceGroupIdPath   = "/csm/api/v1/userId/%s/instance-group/%s"
	InstanceGroupListPath = "/csm/api/v1/userId/%s/instance-group/list"

	IG_INSTANCE_ADD_PATH               = "/csm/api/v1/userId/%s/instance-group/%s/instance/add"
	IG_INSTANCE_REMOVE_PATH            = "/csm/api/v1/userId/%s/instance-group/%s/instance/remove"
	IG_INSTANCE_LIST_PATH              = "/csm/api/v1/userId/%s/instance-group/instance/list"
	IG_QUERY_INSTANCE_LIST_PATH        = "/csm/api/v1/userId/%s/instance/list"
	IG_QUERY_INSTANCE_LIST_FILTER_PATH = "/csm/api/v1/userId/%s/instance/filteredList"

	MultiDimensionLatestMetricsPath = "/csm/api/v2/userId/%s/services/%s/data/metricData/latest/batch"
	MetricsByPartialDimensionsPath  = "/csm/api/v2/userId/%s/services/%s/data/metricData/PartialDimension"
	MultiMetricAllDataPath          = "/csm/api/v2/data/metricAllData"
	MultiMetricAllDataBatchPath     = "/csm/api/v2/data/metricAllData/batch"
	GetMetricDimensionTopPath       = "/csm/api/v2/dimensions/top"
	GetMetricDimensionTopDataPath   = "/csm/api/v2/dimensions/top/data"

	Average     = "average"
	Maximum     = "maximum"
	Minimum     = "minimum"
	Sum         = "sum"
	SampleCount = "sampleCount"

	NoticeEventLevel     = "NOTICE"
	WarningEventLevel    = "WARNING"
	MajorEventLevel      = "MAJOR"
	CriticalEventLevel   = "CRITICAL"
	DimensionNumberLimit = 100

	// CreateDashboardPath userId
	CreateDashboardPath = "/csm/api/v1/dashboard/products/%s/dashboards"

	// DashboardPath userId - dashboardName
	DashboardPath = "/csm/api/v1/dashboard/products/%s/dashboards/%s"

	// DuplicateDashboardPath userId - dashboardName
	DuplicateDashboardPath = "/csm/api/v1/dashboard/products/%s/dashboards/%s/duplicate"

	// DashboardWidgetPath userId - dashboardName - widgetName
	DashboardWidgetPath = "/csm/api/v1/dashboard/products/%s/dashboards/%s/widgets/%s"

	// CreateDashboardWidgetPath userId - dashboardName
	CreateDashboardWidgetPath = "/csm/api/v1/dashboard/products/%s/dashboards/%s/widgets"

	// DuplicateDashboardWidgetPath userId - dashboardName - widgetName
	DuplicateDashboardWidgetPath = "/csm/api/v1/dashboard/products/%s/dashboards/%s/widgets/%s/duplicate"

	ReportDataPath = "/csm/api/v1/dashboard/metric/report"

	TrendDataPath = "/csm/api/v1/dashboard/metric/trend"

	GaugeChartDataPath = "/csm/api/v1/dashboard/metric/gaugechart"

	BillboardDataPath = "/csm/api/v1/dashboard/metric/billboard"

	TrendSeniorDataPath = "/csm/api/v1/dashboard/metric/trend/senior"

	// DimensionsPath userId - serviceName - region
	DimensionsPath = "/csm/api/v1/userId/%s/services/%s/region/%s/metric/dimensions"

	SiteCreateHttpTaskPath  = "/csm/api/v1/userId/%s/site/http/create"
	SiteUpdateHttpTaskPath  = "/csm/api/v1/userId/%s/site/http/update"
	SiteGetHttpTaskPath     = "/csm/api/v1/userId/%s/site/http/detail"
	SiteCreateHttpsTaskPath = "/csm/api/v1/userId/%s/site/https/create"
	SiteUpdateHttpsTaskPath = "/csm/api/v1/userId/%s/site/https/update"
	SiteGetHttpsTaskPath    = "/csm/api/v1/userId/%s/site/https/detail"
	SiteCreatePingTaskPath  = "/csm/api/v1/userId/%s/site/ping/create"
	SiteUpdatePingTaskPath  = "/csm/api/v1/userId/%s/site/ping/update"
	SiteGetPingTaskPath     = "/csm/api/v1/userId/%s/site/ping/detail"
	SiteCreateTcpTaskPath   = "/csm/api/v1/userId/%s/site/tcp/create"
	SiteUpdateTcpTaskPath   = "/csm/api/v1/userId/%s/site/tcp/update"
	SiteGetTcpTaskPath      = "/csm/api/v1/userId/%s/site/tcp/detail"
	SiteCreateUdpTaskPath   = "/csm/api/v1/userId/%s/site/udp/create"
	SiteUpdateUdpTaskPath   = "/csm/api/v1/userId/%s/site/udp/update"
	SiteGetUdpTaskPath      = "/csm/api/v1/userId/%s/site/udp/detail"
	SiteCreateFtpTaskPath   = "/csm/api/v1/userId/%s/site/ftp/create"
	SiteUpdateFtpTaskPath   = "/csm/api/v1/userId/%s/site/ftp/update"
	SiteGetFtpTaskPath      = "/csm/api/v1/userId/%s/site/ftp/detail"
	SiteCreateDnsTaskPath   = "/csm/api/v1/userId/%s/site/dns/create"
	SiteUpdateDnsTaskPath   = "/csm/api/v1/userId/%s/site/dns/update"
	SiteGetDnsTaskPath      = "/csm/api/v1/userId/%s/site/dns/detail"
	SiteGetTaskListPath     = "/csm/api/v1/userId/%s/site/list"
	SiteDeleteTaskPath      = "/csm/api/v1/userId/%s/site/delete"
	SiteGetTaskDetailPath   = "/csm/api/v1/userId/%s/site/%s"

	SiteCreateAlarmConfigPath    = "/csm/api/v1/userId/%s/site/alarm/config/create"
	SiteUpdateAlarmConfigPath    = "/csm/api/v1/userId/%s/site/alarm/config/update"
	SiteDeleteAlarmConfigPath    = "/csm/api/v1/userId/%s/site/alarm/config/delete"
	SiteGetAlarmConfigDetailPath = "/csm/api/v1/userId/%s/site/alarm/config/detail"
	SiteGetAlarmConfigListPath   = "/csm/api/v1/userId/%s/site/alarm/config/list"
	SiteAlarmBlockPath           = "/csm/api/v1/userId/%s/site/alarm/config/block"
	SiteAlarmUnBlockPath         = "/csm/api/v1/userId/%s/site/alarm/config/unblock"
	SiteGetTaskByAlarmNamePath   = "/csm/api/v1/userId/%s/site/alarm/config/%s"
	SiteGetMetricDataPath        = "/csm/api/v1/userId/%s/site/metricSiteData"
	SiteGetOverallViewPath       = "/csm/api/v1/userId/%s/site/idc/overallView"
	SiteGetProvincialViewPath    = "/csm/api/v1/userId/%s/site/idc/provincialView"
	SiteAgentListPath            = "/csm/api/v1/userId/%s/site/agent/list"
	SiteGetAgentByTaskIdPath     = "/csm/api/v1/userId/%s/site/agent/idcIsp"
)
View Source
const (
	ProductName        = "bcm"
	DefaultBcmEndpoint = ProductName + "." + bce.DEFAULT_REGION + "." + bce.DEFAULT_DOMAIN
)
View Source
const (
	CustomAlarmBaseURL           = "/csm/api/v1/custom/alarm/configs"
	CreateCustomAlarmConfig      = CustomAlarmBaseURL + "/create"
	UpdateCustomAlarmConfig      = CustomAlarmBaseURL + "/update"
	BatchDeleteCustomAlarmPolicy = CustomAlarmBaseURL + "/delete"
	ListCustomAlarmPolicy        = CustomAlarmBaseURL + "/list"
	DetailCustomAlarmPolicy      = CustomAlarmBaseURL + "/detail"
	BlockCustomAlarmPolicy       = CustomAlarmBaseURL + "/block"
	UnblockCustomAlarmPolicy     = CustomAlarmBaseURL + "/unblock"
)
View Source
const (
	SiteOnceBaseURL     = "/csm/api/v1/site/once/"
	CreateSiteOnce      = SiteOnceBaseURL + "%s/taskCreate"
	ListSiteOnceTasks   = SiteOnceBaseURL + "/taskList"
	DeleteSiteOnceTasks = SiteOnceBaseURL + "/taskDelete"
	LoadSiteOnceData    = SiteOnceBaseURL + "/loadData"
	DetailSiteOnceTask  = SiteOnceBaseURL + "/groupTask"
	AgainSiteOnce       = SiteOnceBaseURL + "/createFromTask"
	ListSiteOnceHistory = SiteOnceBaseURL + "/groupTaskList"
	GetSiteAgent        = SiteOnceBaseURL + "/siteAgent"
)

Variables

This section is empty.

Functions

func CheckCreateDashboardRequest added in v0.9.167

func CheckCreateDashboardRequest(d *model.DashboardRequest) error

func CheckCreateDnsRequest added in v0.9.167

func CheckCreateDnsRequest(req *model.CreateDNSTask) error

func CheckCreateFtpRequest added in v0.9.167

func CheckCreateFtpRequest(req *model.CreateFtpTask) error

func CheckCreateHttpRequest added in v0.9.167

func CheckCreateHttpRequest(req *model.CreateHTTPTask) error

func CheckCreateHttpsRequest added in v0.9.167

func CheckCreateHttpsRequest(req *model.CreateHTTPSTask) error

func CheckCreatePingRequest added in v0.9.167

func CheckCreatePingRequest(req *model.CreatePingTask) error

func CheckCreateTcpRequest added in v0.9.167

func CheckCreateTcpRequest(req *model.CreateTCPTask) error

func CheckCreateUdpRequest added in v0.9.167

func CheckCreateUdpRequest(req *model.CreateUDPTask) error

func CheckCreateWidgetRequest added in v0.9.167

func CheckCreateWidgetRequest(r *model.DashboardWidgetRequest) error

func CheckDashboardRequest added in v0.9.167

func CheckDashboardRequest(r *model.DashboardRequest) error

func CheckUpdateDashboardRequest added in v0.9.167

func CheckUpdateDashboardRequest(r *model.DashboardRequest) error

func CheckUpdateDnsRequest added in v0.9.167

func CheckUpdateDnsRequest(req *model.CreateDNSTask) error

func CheckUpdateFtpRequest added in v0.9.167

func CheckUpdateFtpRequest(req *model.CreateFtpTask) error

func CheckUpdateHttpRequest added in v0.9.167

func CheckUpdateHttpRequest(req *model.CreateHTTPTask) error

func CheckUpdateHttpsRequest added in v0.9.167

func CheckUpdateHttpsRequest(req *model.CreateHTTPSTask) error

func CheckUpdatePingRequest added in v0.9.167

func CheckUpdatePingRequest(req *model.CreatePingTask) error

func CheckUpdateTcpRequest added in v0.9.167

func CheckUpdateTcpRequest(req *model.CreateTCPTask) error

func CheckUpdateUdpRequest added in v0.9.167

func CheckUpdateUdpRequest(req *model.CreateUDPTask) error

func CheckUpdateWidgetRequest added in v0.9.167

func CheckUpdateWidgetRequest(r *model.DashboardWidgetRequest) error

func CheckWidgetRequest added in v0.9.167

func CheckWidgetRequest(r *model.DashboardWidgetRequest) error

Types

type AlarmLevel added in v0.9.167

type AlarmLevel string
const (
	NOTICE   AlarmLevel = "NOTICE"
	WARNING  AlarmLevel = "WARNING"
	CRITICAL AlarmLevel = "CRITICAL"
	MAJOR    AlarmLevel = "MAJOR"
	CUSTOM   AlarmLevel = "CUSTOM"
)

type AlarmPolicyBatch added in v0.9.167

type AlarmPolicyBatch struct {
	UserId    string   `json:"userId,omitempty"`
	Scope     string   `json:"scope,omitempty"`
	AlarmName []string `json:"alarmName,omitempty"`
}

type AlarmPolicyBatchList added in v0.9.167

type AlarmPolicyBatchList struct {
	MetricAlarmList      []AlarmPolicyBatch      `json:"metricAlarmList,omitempty"`
	EventAlarmList       []EventAlarmPolicyBatch `json:"eventAlarmList,omitempty"`
	CustomAlarmList      []AlarmPolicyBatch      `json:"customAlarmList,omitempty"`
	CustomEventAlarmList []AlarmPolicyBatch      `json:"customEventAlarmList,omitempty"`
}

func (*AlarmPolicyBatchList) Validate added in v0.9.167

func (a *AlarmPolicyBatchList) Validate(typeName string) error

type BlockCustomAlarmPolicyParams added in v0.9.167

type BlockCustomAlarmPolicyParams struct {
	UserId    string `json:"userId,omitempty"`
	Namespace string `json:"namespace,omitempty"`
	AlarmName string `json:"alarmName,omitempty"`
}

func (*BlockCustomAlarmPolicyParams) ConvertToBceParams added in v0.9.167

func (params *BlockCustomAlarmPolicyParams) ConvertToBceParams() map[string]string

type Client

type Client struct {
	*bce.BceClient
}

Client of BCM service is a kind of BceClient, so derived from BceClient

func NewClient

func NewClient(ak, sk, endpoint string) (*Client, error)

NewClient make the bcm service client with default configuration. Use `cli.Config.xxx` to access the config or change it to non-default value.

func (*Client) AddInstanceToInstanceGroup added in v0.9.167

func (c *Client) AddInstanceToInstanceGroup(req *model.MergedGroup) (*model.InstanceGroup, error)

AddInstanceToInstanceGroup - add instance to instance group

func (*Client) AgainExec added in v0.9.167

func (c *Client) AgainExec(request *SiteOnceTaskRequest) (*SiteOnceBaseResponse, error)

再次探测

func (*Client) BatchDeleteNamespaceEvents added in v0.9.167

func (c *Client) BatchDeleteNamespaceEvents(ces *model.CustomBatchEventNames) error

BatchDeleteNamespaceEvents batch delete events in custom monitor namespace

func (*Client) BatchDeleteNamespaceMetrics added in v0.9.167

func (c *Client) BatchDeleteNamespaceMetrics(cis *model.CustomBatchIds) error

BatchDeleteNamespaceMetrics batch delete metrics in custom monitor namespace

func (*Client) BatchDeleteNamespaces added in v0.9.167

func (c *Client) BatchDeleteNamespaces(cns *model.CustomBatchNames) error

BatchDeleteNamespaces batch delete custom monitor namespace

func (*Client) BatchGetMetricData

BatchGetMetricData batch get metric data

func (*Client) BatchGetMetricsAllDataV2 added in v0.9.172

BatchGetMetricsAllDataV2 metric all data

func (*Client) BlockAlarmPolicy added in v0.9.167

func (c *Client) BlockAlarmPolicy(req *model.CommonAlarmConfigRequest) error

BlockAlarmPolicy block alarm config

func (*Client) BlockAlarmPolicyV2 added in v0.9.167

func (c *Client) BlockAlarmPolicyV2(req *model.CommonAlarmConfigRequest) error

BlockAlarmPolicyV2 block alarm config v2

func (*Client) BlockCustomAlarmConfig added in v0.9.167

func (c *Client) BlockCustomAlarmConfig(params *BlockCustomAlarmPolicyParams) error

关闭策略

func (*Client) BlockSiteAlarmConfig added in v0.9.167

func (c *Client) BlockSiteAlarmConfig(req *model.GetSiteAlarmConfigRequest) error

BlockSiteAlarmConfig - block site alarm config

PARAMS:

  • args: the arguments to block site alarm config

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) CreateAction added in v0.9.167

func (c *Client) CreateAction(req *model.CreateActionRequest) error

CreateAction create action

func (*Client) CreateAlarmPolicy added in v0.9.167

func (c *Client) CreateAlarmPolicy(req *model.AlarmConfig) error

CreateAlarmPolicy create alarm config

func (*Client) CreateAlarmPolicyV2 added in v0.9.167

func (c *Client) CreateAlarmPolicyV2(req *model.AlarmConfigV2) (*model.CreateAlarmPolicyV2Response, error)

CreateAlarmPolicyV2 create alarm config v2

func (*Client) CreateAppMonitorAlarmConfig added in v0.9.167

func (c *Client) CreateAppMonitorAlarmConfig(req *model.AppMonitorAlarmConfig) (*model.AppMonitorAlarmConfig, error)

CreateAppMonitorAlarmConfig create application monitor alarm config

func (*Client) CreateApplicationData added in v0.9.167

func (c *Client) CreateApplicationData(req *model.ApplicationInfoRequest) (*model.ApplicationInfoResponse, error)

CreateApplicationData create application data

func (*Client) CreateApplicationDimensionTable added in v0.9.167

CreateApplicationDimensionTable Create the application dimension table

func (*Client) CreateApplicationInstance added in v0.9.167

func (c *Client) CreateApplicationInstance(req *model.ApplicationInstanceCreateRequest) error

CreateApplicationInstance create application instance

func (*Client) CreateApplicationInstanceTask added in v0.9.167

func (c *Client) CreateApplicationInstanceTask(userId string, req *model.ApplicationMonitorTaskInfoRequest) (*model.ApplicationMonitorTaskResponse, error)

func (*Client) CreateApplicationMonitorLogTask added in v0.9.167

func (c *Client) CreateApplicationMonitorLogTask(userId string,
	req *model.ApplicationMonitorTaskInfoLogRequest) (*model.ApplicationMonitorTaskInfoLogResponse, error)

CreateApplicationMonitorLogTask Create the application monitor LOG task

func (*Client) CreateCustomAlarmPolicy added in v0.9.167

func (c *Client) CreateCustomAlarmPolicy(config *CustomAlarmConfig) error

创建警报配置

func (*Client) CreateDashboard added in v0.9.167

func (c *Client) CreateDashboard(req *model.DashboardRequest) (*model.DashboardBaseResponse, error)

CreateDashboard 向服务端创建仪表盘

参数:

req *DashboardRequest: 创建仪表盘请求的参数结构体

返回值:

*DashboardBaseResponse: 创建仪表盘返回的结果结构体
error: 错误信息,如果操作成功则为 nil

func (*Client) CreateDashboardWidget added in v0.9.167

func (c *Client) CreateDashboardWidget(req *model.DashboardWidgetRequest) (*model.DashboardResponse, error)

CreateDashboardWidget 用于创建仪表盘Widget 参数 req 表示创建Widget请求的参数 返回值 result 表示创建Widget的返回结果,error 表示请求错误

func (*Client) CreateEventPolicy added in v0.9.167

func (c *Client) CreateEventPolicy(req *model.EventPolicy) error

CreateEventPolicy - create event policy

func (*Client) CreateInstanceGroup added in v0.9.167

func (c *Client) CreateInstanceGroup(req *model.MergedGroup) (*model.InstanceGroup, error)

CreateInstanceGroup - create instance group

func (*Client) CreateNamespace added in v0.9.167

func (c *Client) CreateNamespace(ns *model.Namespace) error

CreateNamespace create custom monitor namespace

func (*Client) CreateNamespaceEvent added in v0.9.167

func (c *Client) CreateNamespaceEvent(ne *model.NamespaceEvent) error

CreateNamespaceEvent create event in custom monitor namespace

func (*Client) CreateNamespaceMetric added in v0.9.167

func (c *Client) CreateNamespaceMetric(nm *model.NamespaceMetric) error

CreateNamespaceMetric create metric in custom monitor namespace

func (*Client) CreateSiteAlarmConfig added in v0.9.167

func (c *Client) CreateSiteAlarmConfig(req *model.CreateSiteAlarmConfigRequest) error

CreateSiteAlarmConfig - create site alarm config

PARAMS:

  • args: the arguments to create site alarm config

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) CreateSiteDnsTask added in v0.9.167

func (c *Client) CreateSiteDnsTask(req *model.CreateDNSTask) (*model.CreateTaskResponse, error)

CreateSiteDnsTask - create an Dns type site task

PARAMS:

  • args: the arguments to create Dns task

RETURNS:

  • *model.CreateTaskResponse: the result of create Dns task, contains new task ID
  • error: nil if success otherwise the specific error

func (*Client) CreateSiteFtpTask added in v0.9.167

func (c *Client) CreateSiteFtpTask(req *model.CreateFtpTask) (*model.CreateTaskResponse, error)

CreateSiteFtpTask - create an Ftp type site task

PARAMS:

  • args: the arguments to create Ftp task

RETURNS:

  • *model.CreateTaskResponse: the result of create Ftp task, contains new task ID
  • error: nil if success otherwise the specific error

func (*Client) CreateSiteHttpTask added in v0.9.167

func (c *Client) CreateSiteHttpTask(req *model.CreateHTTPTask) (*model.CreateTaskResponse, error)

CreateSiteHttpTask - create an Http type site task

PARAMS:

  • args: the arguments to create Http task

RETURNS:

  • *model.CreateTaskResponse: the result of create Http task, contains new task ID
  • error: nil if success otherwise the specific error

func (*Client) CreateSiteHttpsTask added in v0.9.167

func (c *Client) CreateSiteHttpsTask(req *model.CreateHTTPSTask) (*model.CreateTaskResponse, error)

CreateSiteHttpsTask - create an Https type site task

PARAMS:

  • args: the arguments to create Https task

RETURNS:

  • *model.CreateTaskResponse: the result of create https task, contains new task ID
  • error: nil if success otherwise the specific error

func (*Client) CreateSiteOnce added in v0.9.167

func (c *Client) CreateSiteOnce(request *SiteOnceRequest) (*SiteOnceBaseResponse, error)

创建警报配置

func (*Client) CreateSitePingTask added in v0.9.167

func (c *Client) CreateSitePingTask(req *model.CreatePingTask) (*model.CreateTaskResponse, error)

CreateSitePingTask - create an Ping type site task

PARAMS:

  • args: the arguments to create Ping task

RETURNS:

  • *model.CreateTaskResponse: the result of create ping task, contains new task ID
  • error: nil if success otherwise the specific error

func (*Client) CreateSiteTcpTask added in v0.9.167

func (c *Client) CreateSiteTcpTask(req *model.CreateTCPTask) (*model.CreateTaskResponse, error)

CreateSiteTcpTask - create an Tcp type site task

PARAMS:

  • args: the arguments to create Tcp task

RETURNS:

  • *model.CreateTaskResponse: the result of create Tcp task, contains new task ID
  • error: nil if success otherwise the specific error

func (*Client) CreateSiteUdpTask added in v0.9.167

func (c *Client) CreateSiteUdpTask(req *model.CreateUDPTask) (*model.CreateTaskResponse, error)

CreateSiteUdpTask - create an Udp type site task

PARAMS:

  • args: the arguments to create Udp task

RETURNS:

  • *model.CreateTaskResponse: the result of create Udp task, contains new task ID
  • error: nil if success otherwise the specific error

func (*Client) DeleteAction added in v0.9.167

func (c *Client) DeleteAction(req *model.DeleteActionRequest) error

DeleteAction delete action

func (*Client) DeleteAlarmPolicy added in v0.9.167

func (c *Client) DeleteAlarmPolicy(req *model.CommonAlarmConfigRequest) error

DeleteAlarmPolicy delete alarm config

func (*Client) DeleteAppMonitorAlarmConfig added in v0.9.167

func (c *Client) DeleteAppMonitorAlarmConfig(req *model.DeleteAppMonitorAlarmConfigRequest) error

DeleteAppMonitorAlarmConfig delete application monitor alarm config

func (*Client) DeleteApplicationData added in v0.9.167

func (c *Client) DeleteApplicationData(userId string, req *model.ApplicationInfoDeleteRequest) error

DeleteApplicationData delete application data

func (*Client) DeleteApplicationDimensionTable added in v0.9.167

func (c *Client) DeleteApplicationDimensionTable(req *model.ApplicationDimensionTableDeleteRequest) error

DeleteApplicationDimensionTable Delete the application dimension table

func (*Client) DeleteApplicationInstance added in v0.9.167

func (c *Client) DeleteApplicationInstance(userId string, req *model.ApplicationInstanceDeleteRequest) error

DeleteApplicationInstance delete application instance

func (*Client) DeleteApplicationMonitorTask added in v0.9.167

func (c *Client) DeleteApplicationMonitorTask(req *model.ApplicationMonitorTaskDeleteRequest) error

DeleteApplicationMonitorTask Delete the application monitor task

func (*Client) DeleteCustomAlarmPolicy added in v0.9.167

func (c *Client) DeleteCustomAlarmPolicy(policys *AlarmPolicyBatchList) error

删除警报配置

func (*Client) DeleteDashboard added in v0.9.167

func (c *Client) DeleteDashboard(req *model.DashboardRequest) (*model.DashboardResponse, error)

DeleteDashboard 删除仪表盘 参数:

req *DashboardRequest:删除仪表盘请求参数的结构体

返回值:

*DashboardResponse:删除仪表盘返回结果的结构体
error:请求过程中出现的错误,如果没有错误则为nil

func (*Client) DeleteDashboardWidget added in v0.9.167

func (c *Client) DeleteDashboardWidget(req *model.DashboardWidgetRequest) (*model.DashboardResponse, error)

DeleteDashboardWidget 从用户指定的仪表盘删除指定的Widget

参数:

req *DashboardRequest: 包含用户ID,仪表盘名称和Widget名称的请求体

返回值:

*DashboardResponse: 包含操作结果的响应体指针
error: 错误信息,如果操作成功则为nil

func (*Client) DeleteInstanceGroup added in v0.9.167

func (c *Client) DeleteInstanceGroup(req *model.InstanceGroupBase) (*model.InstanceGroup, error)

DeleteInstanceGroup - delete instance group

func (*Client) DeleteSiteAlarmConfig added in v0.9.167

func (c *Client) DeleteSiteAlarmConfig(req *model.DeleteSiteAlarmConfigRequest) error

DeleteSiteAlarmConfig - delete site alarm config

PARAMS:

  • args: the arguments to delete site alarm config

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteSiteOnceTask added in v0.9.167

func (c *Client) DeleteSiteOnceTask(request *SiteOnceTaskRequest) (*SiteOnceBaseResponse, error)

删除任务

func (*Client) DeleteSiteTask added in v0.9.167

func (c *Client) DeleteSiteTask(req *model.GetTaskDetailRequest) (*model.DeleteTaskResponse, error)

DeleteSiteTask - delete site task

PARAMS:

  • args: the arguments to delete task

RETURNS:

  • *model.DeleteTaskResponse: the result of delete task
  • error: nil if success otherwise the specific error

func (*Client) DetailCustomAlarmConfig added in v0.9.167

func (c *Client) DetailCustomAlarmConfig(params *DetailCustomAlarmPolicyParams) (*CustomAlarmConfig, error)

策略详情

func (*Client) DetailTask added in v0.9.167

func (c *Client) DetailTask(request *SiteOnceTaskRequest) (*LoadDataResponse, error)

获取探测详情

func (*Client) DuplicateDashboard added in v0.9.167

func (c *Client) DuplicateDashboard(req *model.DashboardRequest) (*model.DashboardResponse, error)

DuplicateDashboard 方法用于复制仪表盘 参数req表示复制仪表盘请求,包含用户ID和仪表盘名称 返回复制仪表盘的响应和错误信息

func (*Client) DuplicateDashboardWidget added in v0.9.167

func (c *Client) DuplicateDashboardWidget(req *model.DashboardWidgetRequest) (*model.DashboardResponse, error)

DuplicateDashboardWidget 函数用于复制仪表板小部件 参数req表示复制请求,包括UserID,DashboardName和WidgetName三个字段 返回值 DashboardResponse 为复制后的小部件信息,error为请求过程中发生的错误

func (*Client) GetAlarmDetail added in v0.9.187

func (c *Client) GetAlarmDetail(req *model.AlarmDetailQuery) (*model.AlarmDetailResponse, error)

func (*Client) GetAlarmList added in v0.9.187

func (c *Client) GetAlarmList(req *model.AlarmListQuery) (*model.AlarmListResponse, error)

func (*Client) GetAlarmMetricsForApplication added in v0.9.167

func (c *Client) GetAlarmMetricsForApplication(req *model.GetAppMonitorAlarmMetricsRequest) ([]*model.AppMetric, error)

GetAlarmMetricsForApplication get alarm metrics for application

func (*Client) GetAlarmPolicyDetail added in v0.9.167

func (c *Client) GetAlarmPolicyDetail(req *model.CommonAlarmConfigRequest) (*model.AlarmConfig, error)

GetAlarmPolicyDetail get alarm config detail

func (*Client) GetAlarmPolicyDetailV2 added in v0.9.167

func (c *Client) GetAlarmPolicyDetailV2(req *model.CommonAlarmConfigRequest) (*model.AlarmConfigV2, error)

GetAlarmPolicyDetailV2 get alarm config detail v2

func (*Client) GetAllInstanceForInstanceGroup added in v0.9.167

func (c *Client) GetAllInstanceForInstanceGroup(req *model.IGInstanceQuery) (*model.IGInstanceListResponse, error)

GetAllInstanceForInstanceGroup - get all instance for instance group

func (*Client) GetAppMonitorAlarmConfig added in v0.9.167

GetAppMonitorAlarmConfig get application monitor alarm config

func (*Client) GetApplicationDataList added in v0.9.167

func (c *Client) GetApplicationDataList(userId string, searchName string, pageSize int, pageNo int) (*model.ApplicationInfoListResponse, error)

GetApplicationDataList get application data list

func (*Client) GetApplicationDimensionTableList added in v0.9.167

GetApplicationDimensionTableList Get the application dimension table list

func (*Client) GetApplicationInstanceCreatedList added in v0.9.167

GetApplicationInstanceCreatedList get application instance created list

func (*Client) GetApplicationInstanceList added in v0.9.167

func (c *Client) GetApplicationInstanceList(userId string, req *model.ApplicationInstanceListRequest) (*model.ApplicationInstanceListResponse, error)

GetApplicationInstanceList get application instance list

func (*Client) GetApplicationMonitorTaskDetail added in v0.9.167

GetApplicationMonitorTaskDetail Get the application monitor task detail

func (*Client) GetApplicationMonitorTaskList added in v0.9.167

GetApplicationMonitorTaskList Get the application monitor task list

func (*Client) GetCloudEventData added in v0.9.167

func (c *Client) GetCloudEventData(req *model.EventDataRequest) (*model.CloudEventResponse, error)

GetCloudEventData - get cloud event data

func (*Client) GetCustomEvent added in v0.9.167

func (c *Client) GetCustomEvent(userId string, namespace string, eventName string) (*model.NamespaceEvent, error)

GetCustomEvent get event detail in custom monitor namespace

func (*Client) GetCustomMetric added in v0.9.167

func (c *Client) GetCustomMetric(userId string, namespace string, metricName string) (*model.NamespaceMetric, error)

GetCustomMetric get metric detail in custom monitor namespace

func (*Client) GetDashboard added in v0.9.167

func (c *Client) GetDashboard(req *model.DashboardRequest) (*model.DashboardBaseResponse, error)

GetDashboard 用于获取仪表盘信息 参数 req 是 DashboardRequest 类型指针,表示请求体 返回值是 DashboardBaseResponse 类型指针和一个 error 类型值

func (*Client) GetDashboardBillboardData added in v0.9.167

func (c *Client) GetDashboardBillboardData(req *model.DashboardDataRequest) (*model.DashboardBillboardResponse, error)

GetDashboardBillboardData 获取 Billboard 数据 参数:

req *model.DashboardDataRequest: 包含请求信息的结构体,包括起始时间和结束时间等

返回值:

*model.DashboardBillboardResponse: 包含 Billboard 数据的结构体
error: 错误信息,请求失败时返回非空错误信息

func (*Client) GetDashboardDimensions added in v0.9.167

func (c *Client) GetDashboardDimensions(req *model.DashboardDimensionsRequest) (*map[string][]string, error)

GetDashboardDimensions 是 Client 类型的一个方法,用于获取仪表盘维度信息。 参数 req 是请求体,类型为 *model.DashboardDimensionsRequest。 返回值类型为 *model.DashboardDimensionsResponse 和 error。

func (*Client) GetDashboardGaugeChartData added in v0.9.167

func (c *Client) GetDashboardGaugeChartData(req *model.DashboardDataRequest) (*model.DashboardBillboardResponse, error)

GetDashboardGaugeChartData 获取仪表盘的仪表盘数据 参数 req 表示获取数据的请求,类型为 *model.DashboardDataRequest 返回获取到的仪表盘数据和可能产生的错误

func (*Client) GetDashboardReportData added in v0.9.167

func (c *Client) GetDashboardReportData(req *model.DashboardDataRequest) (*model.DashboardReportDataResponse, error)

GetDashboardReportData 是一个 Client 类型的方法,用于获取仪表板表格数据。 它接收一个 model.DashboardDataRequest 指针类型的请求参数 req 和返回一个 model.DashboardReportDataResponse 指针类型的结果和错误信息。

func (*Client) GetDashboardTrendData added in v0.9.167

func (c *Client) GetDashboardTrendData(req *model.DashboardDataRequest) (*model.DashboardTrendResponse, error)

GetDashboardTrendData 从云监控获取仪表板趋势数据 req: 包含请求信息的结构体 返回获取到的仪表板趋势数据和错误信息

func (*Client) GetDashboardTrendSeniorData added in v0.9.167

func (c *Client) GetDashboardTrendSeniorData(req *model.DashboardDataRequest) (*model.DashboardTrendSeniorResponse, error)

GetDashboardTrendSeniorData 获取监控数据趋势图-高级能力 req: 请求参数,包含时间范围、指标等 返回值:

  • *model.DashboardTrendSeniorResponse: 返回请求结果,包括趋势图数据等
  • error: 返回请求过程中的错误,如果没有错误则为nil

func (*Client) GetDashboardWidget added in v0.9.167

func (c *Client) GetDashboardWidget(req *model.DashboardWidgetRequest) (*model.DashboardBaseResponse, error)

GetDashboardWidget 从云监控获取仪表板部件详情 req: 仪表板部件请求参数 返回获取到的仪表板部件详情和错误信息

func (*Client) GetFilterInstanceForInstanceGroup added in v0.9.167

func (c *Client) GetFilterInstanceForInstanceGroup(req *model.IGInstanceQuery) (*model.IGInstanceListResponse, error)

GetFilterInstanceForInstanceGroup - get filter instance for instance group

func (*Client) GetInstanceGroup added in v0.9.167

func (c *Client) GetInstanceGroup(req *model.InstanceGroupBase) (*model.InstanceGroup, error)

GetInstanceGroup - get instance group

func (*Client) GetInstanceGroupInstanceList added in v0.9.167

func (c *Client) GetInstanceGroupInstanceList(req *model.IGInstanceQuery) (*model.IGInstanceListResponse, error)

GetInstanceGroupInstanceList - get instance group instance list

func (*Client) GetInstanceGroupList added in v0.9.167

func (c *Client) GetInstanceGroupList(req *model.InstanceGroupQuery) (*model.InstanceGroupListResponse, error)

GetInstanceGroupList - get instance group list

func (*Client) GetMetricData

GetMetricData get metric data

func (*Client) GetMetricDataForApplication added in v0.9.167

GetMetricDataForApplication get metric data for application

func (*Client) GetMetricDimensionTop added in v0.9.177

func (c *Client) GetMetricDimensionTop(req *model.TsdbDimensionTopQuery) (*model.TsdbDimensionTopResult, error)

func (*Client) GetMetricDimensionTopData added in v0.9.185

func (c *Client) GetMetricDimensionTopData(req *model.TsdbDimensionTopQuery) ([]*model.TsdbQueryMetaData, error)

func (*Client) GetMetricMetaForApplication added in v0.9.167

func (c *Client) GetMetricMetaForApplication(req *model.GetMetricMetaForApplicationRequest) (map[string][]string, error)

GetMetricMetaForApplication get metric meta for application

func (*Client) GetMetricsAllDataV2 added in v0.9.172

GetMetricsAllDataV2 metric all data

func (*Client) GetMetricsByPartialDimensions added in v0.9.172

GetMetricsByPartialDimensions Get metrics according to partial dimensions

func (*Client) GetMultiDimensionLatestMetrics added in v0.9.172

GetMultiDimensionLatestMetrics Get Multi-Dimension latest metrics

func (*Client) GetPlatformEventData added in v0.9.167

func (c *Client) GetPlatformEventData(req *model.EventDataRequest) (*model.PlatformEventResponse, error)

GetPlatformEventData - get platform event data

func (*Client) GetSiteAgent added in v0.9.167

func (c *Client) GetSiteAgent(userId, ipType string) (*SiteAgentResponseWrapper, error)

获取当前探测点

func (*Client) GetSiteAgentList added in v0.9.167

func (c *Client) GetSiteAgentList(req *model.GetSiteAgentListRequest) ([]*model.GetSiteAgentListResponse, error)

GetSiteAgentList - get site agent list

PARAMS:

  • args: the arguments to get site agent list

RETURNS:

  • *model.GetSiteViewResponse
  • error: nil if success otherwise the specific error

func (*Client) GetSiteAgentListByTaskId added in v0.9.167

func (c *Client) GetSiteAgentListByTaskId(req *model.GetTaskDetailRequest) (*model.GetSiteAgentByTaskIDResponse, error)

GetSiteAgentListByTaskId - get site agent list by taskId

PARAMS:

  • args: the arguments to get site agent list by taskId

RETURNS:

  • *model.GetSiteAgentByTaskIDResponse
  • error: nil if success otherwise the specific error

func (*Client) GetSiteAlarmConfigDetail added in v0.9.167

func (c *Client) GetSiteAlarmConfigDetail(req *model.GetSiteAlarmConfigRequest) (*model.CreateSiteAlarmConfigResponse, error)

GetSiteAlarmConfigDetail - delete site alarm config detail

PARAMS:

  • args: the arguments to get site alarm config detail

RETURNS:

  • *model.CreateSiteAlarmConfigRequest: the result of get site alarm config detail
  • error: nil if success otherwise the specific error

func (*Client) GetSiteAlarmConfigList added in v0.9.167

GetSiteAlarmConfigList - delete site alarm config list

PARAMS:

  • args: the arguments to get site alarm config list

RETURNS:

  • *model.CreateSiteAlarmConfigRequest: the result of get site alarm config list
  • error: nil if success otherwise the specific error

func (*Client) GetSiteDnsTask added in v0.9.167

func (c *Client) GetSiteDnsTask(req *model.GetTaskDetailRequest) (*model.CreateDNSTask, error)

GetSiteDnsTask - get an Dns type site task detail

PARAMS:

  • args: the arguments to get Dns task

RETURNS:

  • *model.GetDnsTask: the result of get Dns task detail
  • error: nil if success otherwise the specific error

func (*Client) GetSiteFtpTask added in v0.9.167

func (c *Client) GetSiteFtpTask(req *model.GetTaskDetailRequest) (*model.CreateFtpTask, error)

GetSiteFtpTask - get an Ftp type site task detail

PARAMS:

  • args: the arguments to get Ftp task

RETURNS:

  • *model.GetFtpTask: the result of get Ftp task detail
  • error: nil if success otherwise the specific error

func (*Client) GetSiteHttpTask added in v0.9.167

func (c *Client) GetSiteHttpTask(req *model.GetTaskDetailRequest) (*model.CreateHTTPTaskResponse, error)

GetSiteHttpTask - get an Http type site task detail

PARAMS:

  • args: the arguments to get Http task

RETURNS:

  • *model.GetHttpTask: the result of get Http task detail
  • error: nil if success otherwise the specific error

func (*Client) GetSiteHttpsTask added in v0.9.167

func (c *Client) GetSiteHttpsTask(req *model.GetTaskDetailRequest) (*model.CreateHTTPSTaskResponse, error)

GetSiteHttpsTask - get an Https type site task detail

PARAMS:

  • args: the arguments to get Https task

RETURNS:

  • *model.GetHttpsTask: the result of get https task detail
  • error: nil if success otherwise the specific error

func (*Client) GetSiteMetricData added in v0.9.167

func (c *Client) GetSiteMetricData(req *model.GetSiteMetricDataRequest) ([]*model.GetSiteMetricDataResponse, error)

GetSiteMetricData - get site metric data

PARAMS:

  • args: the arguments to get site metric data

RETURNS:

  • *model.GetSiteMetricDataResponse
  • error: nil if success otherwise the specific error

func (*Client) GetSiteOverallView added in v0.9.167

func (c *Client) GetSiteOverallView(req *model.GetTaskDetailRequest) ([]*model.GetSiteViewResponse, error)

GetSiteOverallView - get site over all view

PARAMS:

  • args: the arguments to get site over all view

RETURNS:

  • *model.GetSiteViewResponse
  • error: nil if success otherwise the specific error

func (*Client) GetSitePingTask added in v0.9.167

func (c *Client) GetSitePingTask(req *model.GetTaskDetailRequest) (*model.CreatePingTask, error)

GetSitePingTask - get an Ping type site task detail

PARAMS:

  • args: the arguments to get Ping task

RETURNS:

  • *model.GetPingTask: the result of get ping task detail
  • error: nil if success otherwise the specific error

func (*Client) GetSiteProvincialView added in v0.9.167

func (c *Client) GetSiteProvincialView(req *model.GetTaskDetailRequest) ([]*model.GetSiteViewResponse, error)

GetSiteProvincialView - get site provincial view

PARAMS:

  • args: the arguments to get site provincial view

RETURNS:

  • *model.GetSiteViewResponse
  • error: nil if success otherwise the specific error

func (*Client) GetSiteTaskDetail added in v0.9.167

func (c *Client) GetSiteTaskDetail(req *model.GetTaskDetailRequest) (*model.GetTaskDetailResponse, error)

GetSiteTaskDetail - get site task detail

PARAMS:

  • args: the arguments to get task detail

RETURNS:

  • *model.GetTaskDetailResponse: the result of get task
  • error: nil if success otherwise the specific error

func (*Client) GetSiteTaskList added in v0.9.167

func (c *Client) GetSiteTaskList(req *model.GetTaskListRequest) (*model.GetTaskListResponse, error)

GetSiteTaskList - get site task list

PARAMS:

  • args: the arguments to get task list

RETURNS:

  • *model.GetDnsTask: the result of get task list
  • error: nil if success otherwise the specific error

func (*Client) GetSiteTcpTask added in v0.9.167

func (c *Client) GetSiteTcpTask(req *model.GetTaskDetailRequest) (*model.CreateTCPTask, error)

GetSiteTcpTask - get an tcp type site task detail

PARAMS:

  • args: the arguments to get tcp task

RETURNS:

  • *model.GetTcpTask: the result of get tcp task detail
  • error: nil if success otherwise the specific error

func (*Client) GetSiteUdpTask added in v0.9.167

func (c *Client) GetSiteUdpTask(req *model.GetTaskDetailRequest) (*model.CreateUDPTask, error)

GetSiteUdpTask - get an Udp type site task detail

PARAMS:

  • args: the arguments to get Udp task

RETURNS:

  • *model.GetUdpTask: the result of get Udp task detail
  • error: nil if success otherwise the specific error

func (*Client) GetTaskByAlarmName added in v0.9.167

func (c *Client) GetTaskByAlarmName(req *model.GetSiteAlarmConfigRequest) (*model.GetTaskDetailResponse, error)

GetTaskByAlarmName - get site alarm config by alarmName

PARAMS:

  • args: the arguments to get site alarm config by alarmName

RETURNS:

  • *model.GetTaskDetailResponse
  • error: nil if success otherwise the specific error

func (*Client) ListActions added in v0.9.167

func (c *Client) ListActions(req *model.ListActionsRequest) (*model.ListActionsResponse, error)

ListActions list actions

func (*Client) ListAlarmMetrics added in v0.9.167

func (c *Client) ListAlarmMetrics(req *model.ListAlarmMetricsRequest) ([]*model.AlarmMetric, error)

ListAlarmMetrics list alarm metric list

func (*Client) ListAppMonitorAlarmConfigs added in v0.9.167

ListAppMonitorAlarmConfigs list application monitor alarm configs

func (*Client) ListCustomAlarmPolicy added in v0.9.167

func (c *Client) ListCustomAlarmPolicy(params *ListCustomAlarmPolicyParams) (*ListCustomPolicyPageResultResponse, error)

列出警报配置

func (*Client) ListHistoryTasks added in v0.9.167

func (c *Client) ListHistoryTasks(request *SiteOnceTaskRequest) (*SiteOnceTaskListResponse, error)

历史列表

func (*Client) ListNamespaceEvents added in v0.9.167

ListNamespaceEvents list events in custom monitor namespace

func (*Client) ListNamespaceMetrics added in v0.9.167

ListNamespaceMetrics list metrics in custom monitor namespace

func (*Client) ListNamespaces added in v0.9.167

ListNamespaces list custom monitor namespaces

func (*Client) ListNotifyGroups added in v0.9.167

ListNotifyGroups ListCustomEvents list events in custom monitor namespace

func (*Client) ListNotifyParty added in v0.9.167

ListNotifyParty ListNotifyParties list notify parties

func (*Client) ListSingleInstanceAlarmConfigs added in v0.9.167

ListSingleInstanceAlarmConfigs list single instance alarm config list

func (*Client) ListSiteOnceTasks added in v0.9.167

func (c *Client) ListSiteOnceTasks(request *SiteOnceTaskRequest) (*SiteOnceTaskListResponse, error)

历史列表

func (*Client) LoadData added in v0.9.167

func (c *Client) LoadData(request *SiteOnceTaskRequest) (*LoadDataResponse, error)

获取探测结果

func (*Client) LogExtract added in v0.9.167

func (c *Client) LogExtract(req *model.LogExtractRequest) ([]*model.LogExtractResult, error)

LogExtract log extract

func (*Client) RemoveInstanceFromInstanceGroup added in v0.9.167

func (c *Client) RemoveInstanceFromInstanceGroup(req *model.MergedGroup) (*model.InstanceGroup, error)

RemoveInstanceFromInstanceGroup - remove instance from instance group

func (*Client) UnBlockSiteAlarmConfig added in v0.9.167

func (c *Client) UnBlockSiteAlarmConfig(req *model.GetSiteAlarmConfigRequest) error

UnBlockSiteAlarmConfig - block site alarm config

PARAMS:

  • args: the arguments to unblock site alarm config

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UnblockAlarmPolicy added in v0.9.167

func (c *Client) UnblockAlarmPolicy(req *model.CommonAlarmConfigRequest) error

UnblockAlarmPolicy unblock alarm config

func (*Client) UnblockAlarmPolicyV2 added in v0.9.167

func (c *Client) UnblockAlarmPolicyV2(req *model.CommonAlarmConfigRequest) error

UnblockAlarmPolicyV2 unblock alarm config v2

func (*Client) UnblockCustomAlarmConfig added in v0.9.167

func (c *Client) UnblockCustomAlarmConfig(params *UnblockCustomAlarmPolicyParams) error

打开策略

func (*Client) UpdateAction added in v0.9.167

func (c *Client) UpdateAction(req *model.UpdateActionRequest) error

UpdateAction update action

func (*Client) UpdateAlarmPolicy added in v0.9.167

func (c *Client) UpdateAlarmPolicy(req *model.AlarmConfig) error

UpdateAlarmPolicy update alarm config

func (*Client) UpdateAlarmPolicyV2 added in v0.9.167

func (c *Client) UpdateAlarmPolicyV2(req *model.AlarmConfigV2) error

UpdateAlarmPolicyV2 update alarm config v2

func (*Client) UpdateAppMonitorAlarmConfig added in v0.9.167

func (c *Client) UpdateAppMonitorAlarmConfig(req *model.AppMonitorAlarmConfig) (*model.AppMonitorAlarmConfig, error)

UpdateAppMonitorAlarmConfig update application monitor alarm config

func (*Client) UpdateApplicationData added in v0.9.167

func (c *Client) UpdateApplicationData(req *model.ApplicationInfoUpdateRequest) (*model.ApplicationInfoResponse, error)

UpdateApplicationData update application data

func (*Client) UpdateApplicationDimensionTable added in v0.9.167

func (c *Client) UpdateApplicationDimensionTable(req *model.ApplicationDimensionTableInfoRequest) error

UpdateApplicationDimensionTable Update the application dimension table

func (*Client) UpdateApplicationMonitorLogTask added in v0.9.167

UpdateApplicationMonitorLogTask Update the application monitor task

func (*Client) UpdateApplicationMonitorTask added in v0.9.167

func (*Client) UpdateCustomAlarmPolicy added in v0.9.167

func (c *Client) UpdateCustomAlarmPolicy(config *CustomAlarmConfig) error

编辑报警策略

func (*Client) UpdateDashboard added in v0.9.167

func (c *Client) UpdateDashboard(req *model.DashboardRequest) (*model.DashboardResponse, error)

UpdateDashboard 向服务端更新仪表盘信息 参数 req 表示更新仪表盘的请求,包括 UserID 和 DashboardName 返回更新后的仪表盘信息及错误信息

func (*Client) UpdateDashboardWidget added in v0.9.167

func (c *Client) UpdateDashboardWidget(req *model.DashboardWidgetRequest) (*model.DashboardResponse, error)

UpdateDashboardWidget 用于更新指定用户的指定仪表盘页面的指定小控件。

req 表示更新小控件请求的 DashboardRequest 结构体指针。

返回更新小控件请求的 DashboardResponse 结构体指针和 error。

func (*Client) UpdateInstanceGroup added in v0.9.167

func (c *Client) UpdateInstanceGroup(req *model.InstanceGroup) (*model.InstanceGroup, error)

UpdateInstanceGroup - update instance group

func (*Client) UpdateNamespace added in v0.9.167

func (c *Client) UpdateNamespace(ns *model.Namespace) error

UpdateNamespace update custom monitor namespace

func (*Client) UpdateNamespaceEvent added in v0.9.167

func (c *Client) UpdateNamespaceEvent(ne *model.NamespaceEvent) error

UpdateNamespaceEvent update event in custom monitor namespace

func (*Client) UpdateNamespaceMetric added in v0.9.167

func (c *Client) UpdateNamespaceMetric(nm *model.NamespaceMetric) error

UpdateNamespaceMetric update metric in custom monitor namespace

func (*Client) UpdateSiteAlarmConfig added in v0.9.167

func (c *Client) UpdateSiteAlarmConfig(req *model.CreateSiteAlarmConfigRequest) error

UpdateSiteAlarmConfig - update site alarm config

PARAMS:

  • args: the arguments to update site alarm config

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateSiteDnsTask added in v0.9.167

func (c *Client) UpdateSiteDnsTask(req *model.CreateDNSTask) (*model.CreateTaskResponse, error)

UpdateSiteDnsTask - update an Dns type site task

PARAMS:

  • args: the arguments to update Dns task

RETURNS:

  • *model.CreateTaskResponse: the result of update Dns task, contains task ID
  • error: nil if success otherwise the specific error

func (*Client) UpdateSiteFtpTask added in v0.9.167

func (c *Client) UpdateSiteFtpTask(req *model.CreateFtpTask) (*model.CreateTaskResponse, error)

UpdateSiteFtpTask - update an Ftp type site task

PARAMS:

  • args: the arguments to update Ftp task

RETURNS:

  • *model.CreateTaskResponse: the result of update Ftp task, contains task ID
  • error: nil if success otherwise the specific error

func (*Client) UpdateSiteHttpTask added in v0.9.167

func (c *Client) UpdateSiteHttpTask(req *model.CreateHTTPTask) (*model.CreateTaskResponse, error)

UpdateSiteHttpTask - update an Http type site task

PARAMS:

  • args: the arguments to update Http task

RETURNS:

  • *model.CreateTaskResponse: the result of update Http task, contains task ID
  • error: nil if success otherwise the specific error

func (*Client) UpdateSiteHttpsTask added in v0.9.167

func (c *Client) UpdateSiteHttpsTask(req *model.CreateHTTPSTask) (*model.CreateTaskResponse, error)

UpdateSiteHttpsTask - update an Https type site task

PARAMS:

  • args: the arguments to update Https task

RETURNS:

  • *model.CreateTaskResponse: the result of update https task, contains task ID
  • error: nil if success otherwise the specific error

func (*Client) UpdateSitePingTask added in v0.9.167

func (c *Client) UpdateSitePingTask(req *model.CreatePingTask) (*model.CreateTaskResponse, error)

UpdateSitePingTask - update an Ping type site task

PARAMS:

  • args: the arguments to update Ping task

RETURNS:

  • *model.CreateTaskResponse: the result of update ping task, contains task ID
  • error: nil if success otherwise the specific error

func (*Client) UpdateSiteTcpTask added in v0.9.167

func (c *Client) UpdateSiteTcpTask(req *model.CreateTCPTask) (*model.CreateTaskResponse, error)

UpdateSiteTcpTask - update an Tcp type site task

PARAMS:

  • args: the arguments to update Tcp task

RETURNS:

  • *model.CreateTaskResponse: the result of update Tcp task, contains task ID
  • error: nil if success otherwise the specific error

func (*Client) UpdateSiteUdpTask added in v0.9.167

func (c *Client) UpdateSiteUdpTask(req *model.CreateUDPTask) (*model.CreateTaskResponse, error)

UpdateSiteUdpTask - update an Udp type site task

PARAMS:

  • args: the arguments to update Udp task

RETURNS:

  • *model.CreateTaskResponse: the result of update Udp task, contains task ID
  • error: nil if success otherwise the specific error

type ComponentType added in v0.9.167

type ComponentType string

type CustomAlarmConfig added in v0.9.167

type CustomAlarmConfig struct {
	Comment             string            `json:"comment,omitempty"`
	UserID              string            `json:"userId"`
	AlarmName           string            `json:"alarmName"`
	Namespace           string            `json:"namespace"`
	Level               AlarmLevel        `json:"level"`
	ActionEnabled       bool              `json:"actionEnabled,omitempty"`
	PolicyEnabled       bool              `json:"policyEnabled,omitempty"`
	AlarmActions        []string          `json:"alarmActions"`
	OkActions           []string          `json:"okActions,omitempty"`
	InsufficientActions []string          `json:"insufficientActions"`
	InsufficientCycle   int               `json:"insufficientCycle,omitempty"`
	Rules               []CustomAlarmRule `json:"rules"`
	Region              string            `json:"region,omitempty"`
	CallbackURL         string            `json:"callbackUrl,omitempty"`
	CallbackToken       string            `json:"callbackToken,omitempty"`
	Tag                 string            `json:"tag,omitempty"`
	RepeatAlarmCycle    int               `json:"repeatAlarmCycle,omitempty"`
	MaxRepeatCount      int               `json:"maxRepeatCount,omitempty"`
}

func (*CustomAlarmConfig) Validate added in v0.9.167

func (config *CustomAlarmConfig) Validate() error

type CustomAlarmRule added in v0.9.167

type CustomAlarmRule struct {
	ID                 *int64             `json:"id,omitempty"`
	Index              int                `json:"index"`
	MetricName         string             `json:"metricName"`
	Dimensions         []MetricDimensions `json:"dimensions"`
	Statistics         string             `json:"statistics,omitempty"`
	Threshold          string             `json:"threshold,omitempty"`
	ComparisonOperator string             `json:"comparisonOperator,omitempty"`
	Cycle              int                `json:"cycle,omitempty"`
	Count              int                `json:"count,omitempty"`
	Function           string             `json:"function,omitempty"`
}

type CustomTime added in v0.9.167

type CustomTime struct {
	time.Time
}

func (*CustomTime) UnmarshalJSON added in v0.9.167

func (ct *CustomTime) UnmarshalJSON(b []byte) (err error)

type DetailCustomAlarmPolicyParams added in v0.9.167

type DetailCustomAlarmPolicyParams struct {
	UserId    string `json:"userId,omitempty"`
	Namespace string `json:"namespace,omitempty"`
	AlarmName string `json:"alarmName,omitempty"`
}

func (*DetailCustomAlarmPolicyParams) ConvertToBceParams added in v0.9.167

func (params *DetailCustomAlarmPolicyParams) ConvertToBceParams() map[string]string

type EventAlarmPolicyBatch added in v0.9.167

type EventAlarmPolicyBatch struct {
	AlarmPolicyBatch
	PolicyType ComponentType `json:"policyType,omitempty"`
}

type GroupTaskResponseWrapper added in v0.9.167

type GroupTaskResponseWrapper struct {
	Result    SiteOnceGroupTask `json:"result,omitempty"`
	Code      int               `json:"code,omitempty"`
	RequestId string            `json:"requestId,omitempty"`
	Message   string            `json:"message,omitempty"`
	Success   bool              `json:"success,omitempty"`
}

type ListCustomAlarmPolicyParams added in v0.9.167

type ListCustomAlarmPolicyParams struct {
	UserId        string `json:"userId,omitempty"`
	AlarmName     string `json:"alarmName,omitempty"`
	Namespace     string `json:"namespace,omitempty"`
	ActionEnabled bool   `json:"actionEnabled,omitempty"`
	PageNo        int    `json:"pageNo,omitempty"`
	PageSize      int    `json:"pageSize,omitempty"`
}

func (*ListCustomAlarmPolicyParams) ConvertToBceParams added in v0.9.167

func (params *ListCustomAlarmPolicyParams) ConvertToBceParams() map[string]string

type ListCustomPolicyPageResultResponse added in v0.9.167

type ListCustomPolicyPageResultResponse struct {
	OrderBy    string              `json:"orderBy,omitempty"`
	Order      string              `json:"order,omitempty"`
	PageNo     int                 `json:"pageNo,omitempty"`
	PageSize   int                 `json:"pageSize,omitempty"`
	TotalCount int                 `json:"totalCount,omitempty"`
	Result     []CustomAlarmConfig `json:"result,omitempty"`
}

type LoadDataResponse added in v0.9.167

type LoadDataResponse struct {
	Result    SiteOnceTask `json:"result,omitempty"`
	Code      int          `json:"code,omitempty"`
	RequestId string       `json:"requestId,omitempty"`
	Message   string       `json:"message,omitempty"`
	Success   bool         `json:"success,omitempty"`
}

type MetricDimensions added in v0.9.167

type MetricDimensions struct {
	Name  string   `json:"name"`
	Value []string `json:"value,omitempty"`
}

type ResolveTypeEnum added in v0.9.167

type ResolveTypeEnum string

type SiteAdvancedConfig added in v0.9.167

type SiteAdvancedConfig struct {
	Cookies        string `json:"cookies,omitempty"`
	UserAgent      string `json:"userAgent,omitempty"`
	Host           string `json:"host,omitempty"`
	ResponseCode   string `json:"responseCode,omitempty"`
	ResponseCheck  string `json:"responseCheck,omitempty"`
	Username       string `json:"username,omitempty"`
	Password       string `json:"password,omitempty"`
	InputType      int    `json:"inputType,omitempty"`
	Input          string `json:"input,omitempty"`
	OutputType     int    `json:"outputType,omitempty"`
	ExpectedOutput string `json:"expectedOutput,omitempty"`
}

type SiteAgent added in v0.9.167

type SiteAgent struct {
	AgentId    string `json:"agentId,omitempty"`
	AgentName  string `json:"agentName,omitempty"`
	Status     int    `json:"status,omitempty"`
	Ipv6Status int    `json:"ipv6Status,omitempty"`
	Region     string `json:"region,omitempty"` // Assuming SiteAgentRegion is a struct
}

type SiteAgentResponseWrapper added in v0.9.167

type SiteAgentResponseWrapper struct {
	Result    SiteOnceAgent `json:"result,omitempty"`
	Code      int           `json:"code,omitempty"`
	RequestId string        `json:"requestId,omitempty"`
	Message   string        `json:"message,omitempty"`
	Success   bool          `json:"success,omitempty"`
}

type SiteOnceAgent added in v0.9.167

type SiteOnceAgent struct {
	WhiteUser  bool        `json:"whiteUser,omitempty"`
	SiteAgents []SiteAgent `json:"siteAgents,omitempty"`
}

type SiteOnceBaseResponse added in v0.9.167

type SiteOnceBaseResponse struct {
	RequestID string `json:"requestId,omitempty"`
	Message   string `json:"message,omitempty"`
	Success   bool   `json:"success,omitempty"`
	Result    struct {
		SiteID  string `json:"siteId,omitempty"`
		GroupID string `json:"groupId,omitempty"`
	} `json:"result"`
	Code int `json:"code,omitempty"`
}

type SiteOnceConfig added in v0.9.167

type SiteOnceConfig struct {
	Method         string          `json:"method,omitempty"`
	PostContent    string          `json:"postContent,omitempty"`
	ResolveType    ResolveTypeEnum `json:"resolveType,omitempty"`
	Server         string          `json:"server,omitempty"`
	KidnapWhite    string          `json:"kidnapWhite,omitempty"`
	PacketCount    int             `json:"packetCount,omitempty"`
	Port           int             `json:"port,omitempty"`
	InputType      int             `json:"inputType,omitempty"`
	Input          string          `json:"input,omitempty"`
	OutputType     int             `json:"outputType,omitempty"`
	ExpectedOutput string          `json:"expectedOutput,omitempty"`
	AnonymousLogin bool            `json:"anonymousLogin,omitempty"`
	Username       string          `json:"username,omitempty"`
	Password       string          `json:"password,omitempty"`
}

type SiteOnceDetail added in v0.9.167

type SiteOnceDetail struct {
	Id             int64              `json:"id,omitempty"`
	Region         string             `json:"region,omitempty"`
	AgentProv      string             `json:"agentProv,omitempty"`
	AgentIsp       string             `json:"agentIsp,omitempty"`
	ClientIp       string             `json:"clientIp,omitempty"`
	ClientCity     string             `json:"clientCity,omitempty"`
	RemoteAddr     string             `json:"remoteAddr,omitempty"`
	RemoteArea     string             `json:"remoteArea,omitempty"`
	RemoteCity     string             `json:"remoteCity,omitempty"`
	RemoteCounty   string             `json:"remoteCounty,omitempty"`
	AnalysisResult []string           `json:"analysisResult,omitempty"`
	IpProtocol     string             `json:"ipProtocol,omitempty"`
	Metrics        map[string]float64 `json:"metrics,omitempty"`
	Success        float64            `json:"success,omitempty"`
	MonitorTime    CustomTime         `json:"monitorTime,omitempty"`
	Status         string             `json:"status,omitempty"`
}

type SiteOnceGroupTask added in v0.9.167

type SiteOnceGroupTask struct {
	TotalNum     int              `json:"totalNum,omitempty"`
	SumSampleNum int              `json:"sumSampleNum,omitempty"`
	PageNo       int              `json:"pageNo,omitempty"`
	PageSize     int              `json:"pageSize,omitempty"`
	Order        string           `json:"order,omitempty"`
	OrderBy      string           `json:"orderBy,omitempty"`
	FilterArea   string           `json:"filterArea,omitempty"`
	FilterIsp    string           `json:"filterIsp,omitempty"`
	ProtocolType SiteOnceProtocol `json:"protocolType,omitempty"`
	URL          string           `json:"url,omitempty"`
	TaskType     string           `json:"taskType,omitempty"`
	GroupId      string           `json:"groupId,omitempty"`
	MetricOrder  []string         `json:"metricOrder,omitempty"`
	AllAreas     []string         `json:"allAreas,omitempty"`
	OverviewData SiteOnceOverview `json:"overviewData,omitempty"`
	DetailData   []SiteOnceDetail `json:"detailData,omitempty"`
}

type SiteOnceOverview added in v0.9.167

type SiteOnceOverview struct {
	Success        float64            `json:"success,omitempty"`
	Metrics        map[string]float64 `json:"metrics,omitempty"`
	SumSampleNum   int                `json:"sumSampleNum,omitempty"`
	RightSampleNum int                `json:"rightSampleNum,omitempty"`
	ErrSampleNum   int                `json:"errSampleNum,omitempty"`
}

type SiteOnceProtocol added in v0.9.167

type SiteOnceProtocol string

type SiteOnceRecord added in v0.9.167

type SiteOnceRecord struct {
	SiteID       string     `json:"siteId,omitempty"`
	GroupID      string     `json:"groupId,omitempty"`
	UserID       string     `json:"userId,omitempty"`
	TaskType     string     `json:"taskType,omitempty"`
	IPType       string     `json:"ipType,omitempty"`
	ProtocolType string     `json:"protocolType,omitempty"`
	URL          string     `json:"url,omitempty"`
	SumSampleNum int        `json:"sumSampleNum,omitempty"`
	AgentNum     int        `json:"agentNum,omitempty"`
	Success      float64    `json:"success,omitempty"`
	MonitorTime  CustomTime `json:"monitorTime,omitempty"`
	CreateTime   CustomTime `json:"createTime,omitempty"`
	Status       string     `json:"status,omitempty"`
}

type SiteOnceRequest added in v0.9.167

type SiteOnceRequest struct {
	UserID         string             `json:"userId,omitempty"`
	Address        string             `json:"address,omitempty"`
	IpType         string             `json:"ipType,omitempty"`
	GroupId        string             `json:"groupId,omitempty"`
	Idc            string             `json:"idc,omitempty"`
	ProtocolType   SiteOnceProtocol   `json:"protocolType,omitempty"`
	TaskType       string             `json:"taskType,omitempty"`
	Timeout        int                `json:"timeout,omitempty"`
	OnceConfig     SiteOnceConfig     `json:"onceConfig,omitempty"`
	AdvancedFlag   bool               `json:"advancedFlag,omitempty"`
	AdvancedConfig SiteAdvancedConfig `json:"advancedConfig,omitempty"`
}

type SiteOnceTask added in v0.9.167

type SiteOnceTask struct {
	TotalNum     int              `json:"totalNum,omitempty"`
	PageNo       int              `json:"pageNo,omitempty"`
	PageSize     int              `json:"pageSize,omitempty"`
	Order        string           `json:"order,omitempty"`
	OrderBy      string           `json:"orderBy,omitempty"`
	FilterArea   string           `json:"filterArea,omitempty"`
	FilterIsp    string           `json:"filterIsp,omitempty"`
	Status       string           `json:"status,omitempty"`
	ProtocolType SiteOnceProtocol `json:"protocolType,omitempty"`
	URL          string           `json:"url,omitempty"`
	TaskType     string           `json:"taskType,omitempty"`
	AgentNum     int              `json:"agentNum,omitempty"`
	MonitorTime  CustomTime       `json:"monitorTime,omitempty"`
	CreateTime   CustomTime       `json:"createTime,omitempty"`
	SiteId       string           `json:"siteId,omitempty"`
	JobId        string           `json:"jobId,omitempty"`
	GroupId      string           `json:"groupId,omitempty"`
	UserId       string           `json:"userId,omitempty"`
	AllAreas     []string         `json:"allAreas,omitempty"`
	MetricOrder  []string         `json:"metricOrder,omitempty"`
	OverviewData SiteOnceOverview `json:"overviewData,omitempty"`
	DetailData   []SiteOnceDetail `json:"detailData,omitempty"`
	TaskConfig   SiteOnceRequest  `json:"taskConfig,omitempty"`
}

type SiteOnceTaskList added in v0.9.167

type SiteOnceTaskList struct {
	PageNo     int              `json:"pageNo,omitempty"`
	PageSize   int              `json:"pageSize,omitempty"`
	TotalCount int              `json:"totalCount,omitempty"`
	TaskList   []SiteOnceRecord `json:"taskList,omitempty"`
}

type SiteOnceTaskListResponse added in v0.9.167

type SiteOnceTaskListResponse struct {
	Result    SiteOnceTaskList `json:"result,omitempty"`
	Code      int              `json:"code,omitempty"`
	RequestID string           `json:"requestId,omitempty"`
	Message   string           `json:"message,omitempty"`
	Success   bool             `json:"success,omitempty"`
}

type SiteOnceTaskRequest added in v0.9.167

type SiteOnceTaskRequest struct {
	SiteID     string   `json:"siteId,omitempty"`
	UserID     string   `json:"userId,omitempty"`
	GroupID    string   `json:"groupId,omitempty"`
	PageNo     int      `json:"pageNo,omitempty"`
	PageSize   int      `json:"pageSize,omitempty"`
	FilterArea string   `json:"filterArea,omitempty"`
	FilterISP  string   `json:"filterIsp,omitempty"`
	Order      string   `json:"order,omitempty"`
	OrderBy    string   `json:"orderBy,omitempty"`
	URL        string   `json:"url,omitempty"`
	SiteIDs    []string `json:"siteIds,omitempty"`
}

type UnblockCustomAlarmPolicyParams added in v0.9.167

type UnblockCustomAlarmPolicyParams struct {
	UserId    string `json:"userId,omitempty"`
	Namespace string `json:"namespace,omitempty"`
	AlarmName string `json:"alarmName,omitempty"`
}

func (*UnblockCustomAlarmPolicyParams) ConvertToBceParams added in v0.9.167

func (params *UnblockCustomAlarmPolicyParams) ConvertToBceParams() map[string]string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL