Documentation ¶
Index ¶
- Variables
- func BuildFindByIdsDSLBody(ids []string) string
- func GetMetricsAlertFingerprint(uniqueId string, path string, key string) string
- func GetMetricsOpRedisFingerprint(uniqueId string, path string, cmd string, key string, statusCode int) string
- func GetMetricsWebhookNotifyFingerprint(uniqueId string, path string, statusCode int) string
- type BooleanQuery
- type EsConfig
- type Query
- type QueryConfig
- type Rule
- func (rl *Rule) GetEsAddress() string
- func (rl *Rule) GetMetricsOpRedisFingerprint(cmd string, key string, statusCode int) string
- func (rl *Rule) GetMetricsQueryFingerprint(statusCode int) string
- func (rl *Rule) GetQueryStringCountDSL(start time.Time, end time.Time) string
- func (rl *Rule) GetQueryStringDSL(from int, size int, start time.Time, end time.Time) string
Constants ¶
This section is empty.
Variables ¶
View Source
var RuleYamlSchema = `` /* 1269-byte string literal not displayed */
Functions ¶
func BuildFindByIdsDSLBody ¶
Types ¶
type BooleanQuery ¶ added in v1.1.4
type BooleanQuery string
func (BooleanQuery) GetCountDSL ¶ added in v1.1.4
type EsConfig ¶
type EsConfig struct { Addresses []string `json:"addresses" yaml:"addresses"` Username string `json:"username" yaml:"username"` Password string `json:"password" yaml:"password"` ConnTimeout uint `json:"conn_timeout" yaml:"conn_timeout" default:"10"` Version string `json:"version" yaml:"version" default:"v7"` }
type Query ¶
type Query struct { Type string `json:"type" yaml:"type"` Config QueryConfig `json:"config" yaml:"config"` QueryString string `json:"query_string" yaml:"query_string"` BooleanQuery BooleanQuery `json:"boolean_query" yaml:"boolean_query"` Labels map[string]string `json:"labels" yaml:"labels"` Annotations map[string]string `json:"annotations" yaml:"annotations"` }
type QueryConfig ¶ added in v1.1.1
type Rule ¶
type Rule struct { UniqueId string `json:"unique_id" yaml:"unique_id"` Enabled bool `json:"enabled" yaml:"enabled" default:"true"` ES EsConfig `json:"es" yaml:"es"` Index string `json:"index" yaml:"index"` RunEvery xtime.TimeLimit `json:"run_every" yaml:"run_every"` Query Query `json:"query" yaml:"query"` RawContent string `json:"-"` FilePath string `json:"-"` }
func (*Rule) GetEsAddress ¶
func (*Rule) GetMetricsOpRedisFingerprint ¶
func (*Rule) GetMetricsQueryFingerprint ¶
func (*Rule) GetQueryStringCountDSL ¶
Click to show internal directories.
Click to hide internal directories.