Documentation ¶
Index ¶
Constants ¶
View Source
const ( KVLastNotificationTime = "alert_last_notification_time" KVLastTermStartTime = "alert_last_term_start_time" KVLastEscalationTime = "alert_last_escalation_time" KVLastMessageState = "alert_last_message_state" )
View Source
const ( ParamRuleID = "rule_id" //规则 UUID ParamResourceID = "resource_id" // 资源 UUID ParamResourceName = "resource_name" // 资源名称 如集群名称 es-v714 ParamEventID = "event_id" // 检查事件 ID ParamResults = "results" // ParamMessage = "message" //检查消息 自定义(模版渲染) ParamTitle = "title" ParamThreshold = "threshold" //检查预设值 []string ParamResultValue = "result_value" //检查结果 {group_tags:["cluster-xxx", "node-xxx"], check_values:[]} Priority = "priority" //告警等级 ParamTimestamp = "timestamp" //事件产生时间戳 ParamGroupValues = "group_values" ParamIssueTimestamp = "issue_timestamp" ParamRelationValues = "relation_values" )
Variables ¶
This section is empty.
Functions ¶
func GetEnvVariables ¶
func GetInnerConsoleEndpoint ¶
func RegistEngine ¶
Types ¶
type Engine ¶
type Engine interface { GenerateQuery(rule *alerting.Rule, filterParam *alerting.FilterParam) (interface{}, error) ExecuteQuery(rule *alerting.Rule, filterParam *alerting.FilterParam) (*alerting.QueryResult, error) CheckCondition(rule *alerting.Rule) (*alerting.ConditionResult, error) GenerateTask(rule alerting.Rule) func(ctx context.Context) Test(rule *alerting.Rule, msgType string) ([]alerting.ActionExecutionResult, error) GetTargetMetricData(rule *alerting.Rule, isFilterNaN bool, filterParam *alerting.FilterParam) ([]alerting.MetricData, *alerting.QueryResult, error) }
type ParameterMeta ¶
type ParameterMeta struct { Name string `json:"name"` Type string `json:"type"` //int, float, string, date, array, object Description string `json:"description"` Eg string `json:"eg,omitempty"` Properties []ParameterMeta `json:"properties,omitempty"` }
func GetTemplateParameters ¶
func GetTemplateParameters() []ParameterMeta
Click to show internal directories.
Click to hide internal directories.