Documentation ¶
Index ¶
Constants ¶
View Source
const ( UpdateRuleInterval = 30 * time.Second MaxDelayForUpdateRuleTime = 10 * time.Minute )
View Source
const ( AlarmTypeHeartBeat = iota AlarmTypeThreshold AlarmTypeTopN AlarmTypeCompare )
View Source
const ( CompareTypeDifference = iota CompareTypeRatio )
View Source
const ( UpdateCurvesInterval = 600 AlarmQueryDelay = 10 // the end of query time range is 10 seconds ago )
View Source
const MaxCompareDays = 7
View Source
const MaxTopNLimit = 100
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlarmDataSource ¶
type AlarmDataSource struct { Metric string `json:"metric"` Tags map[string]string `json:"tags"` DownSample int64 `json:"down_sample"` Aggregation string `json:"aggregation"` Sort string `json:"sort"` // use for topN rule only Limit int `json:"limit"` // use for topN rule only CompareType int `json:"compare_type"` // use for compare rule only CompareDaysAgo int `json:"compare_days_ago"` // use for compare rule only CompareSeconds int `json:"compare_seconds"` // use for compare rule only }
type AlarmRule ¶
func (*AlarmRule) GetAlarmRule ¶
type AlarmTrigger ¶
type CompareRule ¶
type CompareRule struct { AlarmRule // contains filtered or unexported fields }
func (*CompareRule) Parse ¶
func (r *CompareRule) Parse() error
func (*CompareRule) Run ¶
func (r *CompareRule) Run()
func (*CompareRule) Start ¶
func (r *CompareRule) Start()
type HeartBeatRule ¶
type HeartBeatRule struct { AlarmRule // contains filtered or unexported fields }
func (*HeartBeatRule) Parse ¶
func (r *HeartBeatRule) Parse() error
func (*HeartBeatRule) Run ¶
func (r *HeartBeatRule) Run()
func (*HeartBeatRule) Start ¶
func (r *HeartBeatRule) Start()
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager() *Manager
type ThresholdRule ¶
type ThresholdRule struct { AlarmRule // contains filtered or unexported fields }
func (*ThresholdRule) Parse ¶
func (r *ThresholdRule) Parse() error
func (*ThresholdRule) Run ¶
func (r *ThresholdRule) Run()
func (*ThresholdRule) Start ¶
func (r *ThresholdRule) Start()
Click to show internal directories.
Click to hide internal directories.