Documentation ¶
Overview ¶
Code generated by Iacker. DO NOT EDIT IT.
Package v1 ¶
Alert Policy ¶
Alert policy is a set of rules that define when to trigger an alert. You can create alert policies for your data sources, and set up alert targets to receive alerts.
Guance Cloud supports alert policy management for the results of monitor checks, by sending alert notification emails or group message notifications, so that you can know about the abnormal data situation of the monitoring in time, find problems, and solve problems.
Relationships:
```mermaid graph LR
A[Monitor] --> B[Alert Policy] --> C[Notification] ```
Notes:
1. When a monitor is created, an alert policy must be selected, and the default is selected by default; 2. When a certain alert policy is deleted, the monitor under the deleted alert policy will automatically be classified into the default.
Index ¶
- Constants
- Variables
- type AlertPolicy
- func (*AlertPolicy) Descriptor() ([]byte, []int)deprecated
- func (x *AlertPolicy) GetAlertTargets() []*AlertTarget
- func (x *AlertPolicy) GetName() string
- func (x *AlertPolicy) GetSilentTimeout() string
- func (x *AlertPolicy) GetStatuses() []string
- func (*AlertPolicy) ProtoMessage()
- func (x *AlertPolicy) ProtoReflect() protoreflect.Message
- func (x *AlertPolicy) Reset()
- func (x *AlertPolicy) String() string
- func (m *AlertPolicy) Validate() error
- func (m *AlertPolicy) ValidateAll() error
- type AlertPolicyMultiError
- type AlertPolicyValidationError
- func (e AlertPolicyValidationError) Cause() error
- func (e AlertPolicyValidationError) Error() string
- func (e AlertPolicyValidationError) ErrorName() string
- func (e AlertPolicyValidationError) Field() string
- func (e AlertPolicyValidationError) Key() bool
- func (e AlertPolicyValidationError) Reason() string
- type AlertTarget
- func (*AlertTarget) Descriptor() ([]byte, []int)deprecated
- func (x *AlertTarget) GetMemberGroup() *TargetMemberGroup
- func (x *AlertTarget) GetNotification() *TargetNotification
- func (x *AlertTarget) GetType() string
- func (*AlertTarget) ProtoMessage()
- func (x *AlertTarget) ProtoReflect() protoreflect.Message
- func (x *AlertTarget) Reset()
- func (x *AlertTarget) String() string
- func (m *AlertTarget) Validate() error
- func (m *AlertTarget) ValidateAll() error
- type AlertTargetMultiError
- type AlertTargetValidationError
- func (e AlertTargetValidationError) Cause() error
- func (e AlertTargetValidationError) Error() string
- func (e AlertTargetValidationError) ErrorName() string
- func (e AlertTargetValidationError) Field() string
- func (e AlertTargetValidationError) Key() bool
- func (e AlertTargetValidationError) Reason() string
- type TargetMemberGroup
- func (*TargetMemberGroup) Descriptor() ([]byte, []int)deprecated
- func (x *TargetMemberGroup) GetId() string
- func (*TargetMemberGroup) ProtoMessage()
- func (x *TargetMemberGroup) ProtoReflect() protoreflect.Message
- func (x *TargetMemberGroup) Reset()
- func (x *TargetMemberGroup) String() string
- func (m *TargetMemberGroup) Validate() error
- func (m *TargetMemberGroup) ValidateAll() error
- type TargetMemberGroupMultiError
- type TargetMemberGroupValidationError
- func (e TargetMemberGroupValidationError) Cause() error
- func (e TargetMemberGroupValidationError) Error() string
- func (e TargetMemberGroupValidationError) ErrorName() string
- func (e TargetMemberGroupValidationError) Field() string
- func (e TargetMemberGroupValidationError) Key() bool
- func (e TargetMemberGroupValidationError) Reason() string
- type TargetNotification
- func (*TargetNotification) Descriptor() ([]byte, []int)deprecated
- func (x *TargetNotification) GetId() string
- func (*TargetNotification) ProtoMessage()
- func (x *TargetNotification) ProtoReflect() protoreflect.Message
- func (x *TargetNotification) Reset()
- func (x *TargetNotification) String() string
- func (m *TargetNotification) Validate() error
- func (m *TargetNotification) ValidateAll() error
- type TargetNotificationMultiError
- type TargetNotificationValidationError
- func (e TargetNotificationValidationError) Cause() error
- func (e TargetNotificationValidationError) Error() string
- func (e TargetNotificationValidationError) ErrorName() string
- func (e TargetNotificationValidationError) Field() string
- func (e TargetNotificationValidationError) Key() bool
- func (e TargetNotificationValidationError) Reason() string
Constants ¶
const ( // AlertPolicyStatusesAll is the value of ALL AlertPolicyStatusesAll = "ALL" // AlertPolicyStatusesCritical is the value of critical AlertPolicyStatusesCritical = "critical" // AlertPolicyStatusesError is the value of error AlertPolicyStatusesError = "error" // AlertPolicyStatusesWarning is the value of warning AlertPolicyStatusesWarning = "warning" // AlertPolicyStatusesInfo is the value of info AlertPolicyStatusesInfo = "info" // AlertPolicyStatusesOk is the value of ok AlertPolicyStatusesOk = "ok" // AlertPolicyStatusesNodata is the value of nodata AlertPolicyStatusesNodata = "nodata" // AlertPolicyStatusesNodataOk is the value of nodata_ok AlertPolicyStatusesNodataOk = "nodata_ok" // AlertPolicyStatusesNodataAsOk is the value of nodata_as_ok AlertPolicyStatusesNodataAsOk = "nodata_as_ok" )
const ( // AlertTargetTypeMembergroup is the value of Member group AlertTargetTypeMembergroup = "member_group" // AlertTargetTypeNotification is the value of Notification object AlertTargetTypeNotification = "notification" )
const ResourceType = "AlertPolicy"
ResourceType is the unique type name of AlertPolicy
Variables ¶
var File_pkg_resources_alertpolicy_v1_alertpolicy_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type AlertPolicy ¶
type AlertPolicy struct { // Alert Policy Name Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Silent timeout timestamp SilentTimeout *string `protobuf:"bytes,2,opt,name=silent_timeout,json=silentTimeout,proto3,oneof" json:"silent_timeout,omitempty"` // The status value of the event to be sent Statuses []string `protobuf:"bytes,3,rep,name=statuses,proto3" json:"statuses,omitempty"` // Alert Action AlertTargets []*AlertTarget `protobuf:"bytes,4,rep,name=alert_targets,json=alertTargets,proto3" json:"alert_targets,omitempty"` // contains filtered or unexported fields }
func (*AlertPolicy) Descriptor
deprecated
func (*AlertPolicy) Descriptor() ([]byte, []int)
Deprecated: Use AlertPolicy.ProtoReflect.Descriptor instead.
func (*AlertPolicy) GetAlertTargets ¶
func (x *AlertPolicy) GetAlertTargets() []*AlertTarget
func (*AlertPolicy) GetName ¶
func (x *AlertPolicy) GetName() string
func (*AlertPolicy) GetSilentTimeout ¶
func (x *AlertPolicy) GetSilentTimeout() string
func (*AlertPolicy) GetStatuses ¶
func (x *AlertPolicy) GetStatuses() []string
func (*AlertPolicy) ProtoMessage ¶
func (*AlertPolicy) ProtoMessage()
func (*AlertPolicy) ProtoReflect ¶
func (x *AlertPolicy) ProtoReflect() protoreflect.Message
func (*AlertPolicy) Reset ¶
func (x *AlertPolicy) Reset()
func (*AlertPolicy) String ¶
func (x *AlertPolicy) String() string
func (*AlertPolicy) Validate ¶
func (m *AlertPolicy) Validate() error
Validate checks the field values on AlertPolicy with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*AlertPolicy) ValidateAll ¶
func (m *AlertPolicy) ValidateAll() error
ValidateAll checks the field values on AlertPolicy with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AlertPolicyMultiError, or nil if none found.
type AlertPolicyMultiError ¶
type AlertPolicyMultiError []error
AlertPolicyMultiError is an error wrapping multiple validation errors returned by AlertPolicy.ValidateAll() if the designated constraints aren't met.
func (AlertPolicyMultiError) AllErrors ¶
func (m AlertPolicyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AlertPolicyMultiError) Error ¶
func (m AlertPolicyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AlertPolicyValidationError ¶
type AlertPolicyValidationError struct {
// contains filtered or unexported fields
}
AlertPolicyValidationError is the validation error returned by AlertPolicy.Validate if the designated constraints aren't met.
func (AlertPolicyValidationError) Cause ¶
func (e AlertPolicyValidationError) Cause() error
Cause function returns cause value.
func (AlertPolicyValidationError) Error ¶
func (e AlertPolicyValidationError) Error() string
Error satisfies the builtin error interface
func (AlertPolicyValidationError) ErrorName ¶
func (e AlertPolicyValidationError) ErrorName() string
ErrorName returns error name.
func (AlertPolicyValidationError) Field ¶
func (e AlertPolicyValidationError) Field() string
Field function returns field value.
func (AlertPolicyValidationError) Key ¶
func (e AlertPolicyValidationError) Key() bool
Key function returns key value.
func (AlertPolicyValidationError) Reason ¶
func (e AlertPolicyValidationError) Reason() string
Reason function returns reason value.
type AlertTarget ¶
type AlertTarget struct { // Alert type Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // Notification Notification *TargetNotification `protobuf:"bytes,2,opt,name=notification,proto3" json:"notification,omitempty"` // Member Group MemberGroup *TargetMemberGroup `protobuf:"bytes,3,opt,name=member_group,json=memberGroup,proto3" json:"member_group,omitempty"` // contains filtered or unexported fields }
func (*AlertTarget) Descriptor
deprecated
func (*AlertTarget) Descriptor() ([]byte, []int)
Deprecated: Use AlertTarget.ProtoReflect.Descriptor instead.
func (*AlertTarget) GetMemberGroup ¶
func (x *AlertTarget) GetMemberGroup() *TargetMemberGroup
func (*AlertTarget) GetNotification ¶
func (x *AlertTarget) GetNotification() *TargetNotification
func (*AlertTarget) GetType ¶
func (x *AlertTarget) GetType() string
func (*AlertTarget) ProtoMessage ¶
func (*AlertTarget) ProtoMessage()
func (*AlertTarget) ProtoReflect ¶
func (x *AlertTarget) ProtoReflect() protoreflect.Message
func (*AlertTarget) Reset ¶
func (x *AlertTarget) Reset()
func (*AlertTarget) String ¶
func (x *AlertTarget) String() string
func (*AlertTarget) Validate ¶
func (m *AlertTarget) Validate() error
Validate checks the field values on AlertTarget with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*AlertTarget) ValidateAll ¶
func (m *AlertTarget) ValidateAll() error
ValidateAll checks the field values on AlertTarget with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AlertTargetMultiError, or nil if none found.
type AlertTargetMultiError ¶
type AlertTargetMultiError []error
AlertTargetMultiError is an error wrapping multiple validation errors returned by AlertTarget.ValidateAll() if the designated constraints aren't met.
func (AlertTargetMultiError) AllErrors ¶
func (m AlertTargetMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AlertTargetMultiError) Error ¶
func (m AlertTargetMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AlertTargetValidationError ¶
type AlertTargetValidationError struct {
// contains filtered or unexported fields
}
AlertTargetValidationError is the validation error returned by AlertTarget.Validate if the designated constraints aren't met.
func (AlertTargetValidationError) Cause ¶
func (e AlertTargetValidationError) Cause() error
Cause function returns cause value.
func (AlertTargetValidationError) Error ¶
func (e AlertTargetValidationError) Error() string
Error satisfies the builtin error interface
func (AlertTargetValidationError) ErrorName ¶
func (e AlertTargetValidationError) ErrorName() string
ErrorName returns error name.
func (AlertTargetValidationError) Field ¶
func (e AlertTargetValidationError) Field() string
Field function returns field value.
func (AlertTargetValidationError) Key ¶
func (e AlertTargetValidationError) Key() bool
Key function returns key value.
func (AlertTargetValidationError) Reason ¶
func (e AlertTargetValidationError) Reason() string
Reason function returns reason value.
type TargetMemberGroup ¶
type TargetMemberGroup struct { // Member Group Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*TargetMemberGroup) Descriptor
deprecated
func (*TargetMemberGroup) Descriptor() ([]byte, []int)
Deprecated: Use TargetMemberGroup.ProtoReflect.Descriptor instead.
func (*TargetMemberGroup) GetId ¶
func (x *TargetMemberGroup) GetId() string
func (*TargetMemberGroup) ProtoMessage ¶
func (*TargetMemberGroup) ProtoMessage()
func (*TargetMemberGroup) ProtoReflect ¶
func (x *TargetMemberGroup) ProtoReflect() protoreflect.Message
func (*TargetMemberGroup) Reset ¶
func (x *TargetMemberGroup) Reset()
func (*TargetMemberGroup) String ¶
func (x *TargetMemberGroup) String() string
func (*TargetMemberGroup) Validate ¶
func (m *TargetMemberGroup) Validate() error
Validate checks the field values on TargetMemberGroup with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*TargetMemberGroup) ValidateAll ¶
func (m *TargetMemberGroup) ValidateAll() error
ValidateAll checks the field values on TargetMemberGroup with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in TargetMemberGroupMultiError, or nil if none found.
type TargetMemberGroupMultiError ¶
type TargetMemberGroupMultiError []error
TargetMemberGroupMultiError is an error wrapping multiple validation errors returned by TargetMemberGroup.ValidateAll() if the designated constraints aren't met.
func (TargetMemberGroupMultiError) AllErrors ¶
func (m TargetMemberGroupMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (TargetMemberGroupMultiError) Error ¶
func (m TargetMemberGroupMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type TargetMemberGroupValidationError ¶
type TargetMemberGroupValidationError struct {
// contains filtered or unexported fields
}
TargetMemberGroupValidationError is the validation error returned by TargetMemberGroup.Validate if the designated constraints aren't met.
func (TargetMemberGroupValidationError) Cause ¶
func (e TargetMemberGroupValidationError) Cause() error
Cause function returns cause value.
func (TargetMemberGroupValidationError) Error ¶
func (e TargetMemberGroupValidationError) Error() string
Error satisfies the builtin error interface
func (TargetMemberGroupValidationError) ErrorName ¶
func (e TargetMemberGroupValidationError) ErrorName() string
ErrorName returns error name.
func (TargetMemberGroupValidationError) Field ¶
func (e TargetMemberGroupValidationError) Field() string
Field function returns field value.
func (TargetMemberGroupValidationError) Key ¶
func (e TargetMemberGroupValidationError) Key() bool
Key function returns key value.
func (TargetMemberGroupValidationError) Reason ¶
func (e TargetMemberGroupValidationError) Reason() string
Reason function returns reason value.
type TargetNotification ¶
type TargetNotification struct { // Notification Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*TargetNotification) Descriptor
deprecated
func (*TargetNotification) Descriptor() ([]byte, []int)
Deprecated: Use TargetNotification.ProtoReflect.Descriptor instead.
func (*TargetNotification) GetId ¶
func (x *TargetNotification) GetId() string
func (*TargetNotification) ProtoMessage ¶
func (*TargetNotification) ProtoMessage()
func (*TargetNotification) ProtoReflect ¶
func (x *TargetNotification) ProtoReflect() protoreflect.Message
func (*TargetNotification) Reset ¶
func (x *TargetNotification) Reset()
func (*TargetNotification) String ¶
func (x *TargetNotification) String() string
func (*TargetNotification) Validate ¶
func (m *TargetNotification) Validate() error
Validate checks the field values on TargetNotification with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*TargetNotification) ValidateAll ¶
func (m *TargetNotification) ValidateAll() error
ValidateAll checks the field values on TargetNotification with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in TargetNotificationMultiError, or nil if none found.
type TargetNotificationMultiError ¶
type TargetNotificationMultiError []error
TargetNotificationMultiError is an error wrapping multiple validation errors returned by TargetNotification.ValidateAll() if the designated constraints aren't met.
func (TargetNotificationMultiError) AllErrors ¶
func (m TargetNotificationMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (TargetNotificationMultiError) Error ¶
func (m TargetNotificationMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type TargetNotificationValidationError ¶
type TargetNotificationValidationError struct {
// contains filtered or unexported fields
}
TargetNotificationValidationError is the validation error returned by TargetNotification.Validate if the designated constraints aren't met.
func (TargetNotificationValidationError) Cause ¶
func (e TargetNotificationValidationError) Cause() error
Cause function returns cause value.
func (TargetNotificationValidationError) Error ¶
func (e TargetNotificationValidationError) Error() string
Error satisfies the builtin error interface
func (TargetNotificationValidationError) ErrorName ¶
func (e TargetNotificationValidationError) ErrorName() string
ErrorName returns error name.
func (TargetNotificationValidationError) Field ¶
func (e TargetNotificationValidationError) Field() string
Field function returns field value.
func (TargetNotificationValidationError) Key ¶
func (e TargetNotificationValidationError) Key() bool
Key function returns key value.
func (TargetNotificationValidationError) Reason ¶
func (e TargetNotificationValidationError) Reason() string
Reason function returns reason value.