Documentation ¶
Index ¶
- Constants
- Variables
- func HumanThresholdType(typ string) string
- func ValidateAlertCondition(input monitor.AlertCondition) error
- func ValidateAlertConditionEvaluator(input monitor.Condition) error
- func ValidateAlertConditionQuery(input monitor.AlertQuery) error
- func ValidateAlertConditionRangedEvaluator(input monitor.Condition) error
- func ValidateAlertConditionReducer(input monitor.Condition) error
- func ValidateAlertConditionThresholdEvaluator(input monitor.Condition) error
- func ValidateAlertConditionType(typ string) error
- func ValidateAlertCreateInput(input monitor.AlertCreateInput) error
- func ValidateAlertQueryModel(input monitor.MetricQuery) error
- func ValidateFromAndToValue(input monitor.AlertQuery) error
- func ValidateFromValue(from string) error
- func ValidateSelectOfMetricQuery(input monitor.AlertQuery) error
- func ValidateToValue(to string) error
Constants ¶
View Source
const ( ErrMissingParameterThreshold = errors.Error("Condition is missing the threshold parameter") ErrMissingParameterType = errors.Error("Condition is missing the type parameter") ErrInvalidEvaluatorType = errors.Error("Invalid condition evaluator type") ErrAlertConditionUnknown = errors.Error("Unknown alert condition") ErrAlertConditionEmpty = errors.Error("Alert is missing conditions") )
Variables ¶
View Source
var ( EvaluatorDefaultTypes = []string{"gt", "lt", "eq"} EvaluatorRangedTypes = []string{"within_range", "outside_range"} CommonAlertType = []string{ monitor.CommonAlertNomalAlertType, monitor.CommonAlertSystemAlertType, monitor.CommonAlertServiceAlertType, } CommonAlertReducerFieldOpts = []string{"/"} CommonAlertNotifyTypes = []string{"email", "mobile", "dingtalk", "webconsole", "feishu"} ConditionTypes = []string{"query", "nodata_query"} )
Functions ¶
func HumanThresholdType ¶
HumanThresholdType converts a threshold "type" string to a string that matches the UI so errors are less confusing.
func ValidateAlertCondition ¶
func ValidateAlertCondition(input monitor.AlertCondition) error
func ValidateAlertConditionQuery ¶
func ValidateAlertConditionQuery(input monitor.AlertQuery) error
func ValidateAlertCreateInput ¶
func ValidateAlertCreateInput(input monitor.AlertCreateInput) error
func ValidateAlertQueryModel ¶
func ValidateAlertQueryModel(input monitor.MetricQuery) error
func ValidateFromAndToValue ¶
func ValidateFromAndToValue(input monitor.AlertQuery) error
func ValidateFromValue ¶
func ValidateSelectOfMetricQuery ¶
func ValidateSelectOfMetricQuery(input monitor.AlertQuery) error
func ValidateToValue ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.