logalert

package
v1.4.0-rc.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModeRegexp   = "regexp"
	ModeNoData   = "noData"
	MatchTypeAll = "all"
	MatchTypeAny = "any"
)
View Source
const NoDataKey = "NoDataAlert"
View Source
const Type = "logAlert"

Variables

This section is empty.

Functions

This section is empty.

Types

type Advanced added in v1.4.0

type Advanced struct {
	Enable    bool          `yaml:"enabled"`
	Mode      []string      `yaml:"mode,omitempty"`
	Duration  time.Duration `yaml:"duration,omitempty"`
	MatchType string        `yaml:"matchType,omitempty"`
	Rules     []Rule        `yaml:"rules,omitempty"`
}

type Config

type Config struct {
	interceptor.ExtensionConfig `yaml:",inline"`

	Matcher         Matcher           `yaml:"matcher,omitempty"`
	Labels          Labels            `yaml:"labels,omitempty"`
	Additions       map[string]string `yaml:"additions,omitempty"`
	Ignore          []string          `yaml:"ignore,omitempty"`
	Advanced        Advanced          `yaml:"advanced,omitempty"`
	Template        *string           `yaml:"template,omitempty"`
	SendOnlyMatched bool              `yaml:"sendOnlyMatched,omitempty"`
}

func (*Config) Validate

func (c *Config) Validate() error

type Group added in v1.4.0

type Group struct {
	Key      string `yaml:"key,omitempty"`
	Operator string `yaml:"operator,omitempty"`
	Value    string `yaml:"value,omitempty"`
}

type Interceptor

type Interceptor struct {
	// contains filtered or unexported fields
}

func (*Interceptor) BelongTo added in v1.3.0

func (i *Interceptor) BelongTo() (componentTypes []string)

func (*Interceptor) Category

func (i *Interceptor) Category() api.Category

func (*Interceptor) Config

func (i *Interceptor) Config() interface{}

func (*Interceptor) IgnoreRetry added in v1.3.0

func (i *Interceptor) IgnoreRetry() bool

func (*Interceptor) Init

func (i *Interceptor) Init(context api.Context) error

func (*Interceptor) Intercept

func (i *Interceptor) Intercept(invoker source.Invoker, invocation source.Invocation) api.Result

func (*Interceptor) Order added in v1.3.0

func (i *Interceptor) Order() int

func (*Interceptor) Start

func (i *Interceptor) Start() error

func (*Interceptor) Stop

func (i *Interceptor) Stop()

func (*Interceptor) String

func (i *Interceptor) String() string

func (*Interceptor) Type

func (i *Interceptor) Type() api.Type

type Labels

type Labels struct {
	FromHeader []string `yaml:"from,omitempty"`
}

type Matcher

type Matcher struct {
	Regexp       []string `yaml:"regexp,omitempty"`
	Contains     []string `yaml:"contains,omitempty"`
	TargetHeader string   `yaml:"target,omitempty"`
}

type Rule added in v1.4.0

type Rule struct {
	Regexp    string  `yaml:"regexp,omitempty"`
	MatchType string  `yaml:"matchType,omitempty"`
	Groups    []Group `yaml:"groups,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL