Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckConfig ¶
type Config ¶
type Config struct {
MonitorSite string `yaml:"monitor_site"`
Sites []SiteConfig `yaml:"sites"`
Rules []rules.Rule `yaml:"rules"`
Notifications []NotificationConfig `yaml:"notifications"`
}
func LoadConfiguration ¶
type GroupConfig ¶
type GroupConfig struct {
Name string `yaml:"name"`
RuleMode RuleMode `yaml:"rule_mode,omitempty"`
Tags []string `yaml:"tags"`
Hosts []HostConfig `yaml:"hosts"`
Checks []CheckConfig `yaml:"checks"`
}
func (*GroupConfig) Validate ¶
func (g *GroupConfig) Validate() error
type HostConfig ¶
type HostConfig struct {
Host string `yaml:"host"`
RuleMode RuleMode `yaml:"rule_mode,omitempty"`
Tags []string `yaml:"tags"`
Checks []CheckConfig `yaml:"checks"`
}
type NotificationConfig ¶
type NotificationConfig struct {
Type string `yaml:"type"`
}
type RuleModeResolver ¶
type RuleModeResolver struct {
Group GroupConfig
}
func NewRuleModeResolver ¶
func NewRuleModeResolver(group GroupConfig) *RuleModeResolver
func (*RuleModeResolver) GetEffectiveRuleMode ¶
func (r *RuleModeResolver) GetEffectiveRuleMode(check CheckConfig) RuleMode
func (*RuleModeResolver) ShouldTrigger ¶
func (r *RuleModeResolver) ShouldTrigger(anyDown bool, allDown bool, check CheckConfig) bool
type SiteConfig ¶
type SiteConfig struct {
Name string `yaml:"name"`
Tags []string `yaml:"tags"`
Groups []GroupConfig `yaml:"groups"`
}
Click to show internal directories.
Click to hide internal directories.