Documentation
¶
Index ¶
- Constants
- Variables
- type Attribute
- type Options
- func (o *Options) GenMatchRule()
- func (o *Options) GenTaskUpdate() Options
- func (o *Options) HasEmailRecipients() bool
- func (o *Options) HasSlackChannels() bool
- func (o *Options) InitResponse()
- func (o *Options) InitStatus(current, desired string)
- func (o *Options) SetCompleted()
- func (o *Options) SetError()
- type Policy
- type Response
Constants ¶
View Source
const ( Triggers = "triggers" DB = "triggers" Collection = "triggers" ResponsePolicyV2 = "/etc/policies/alert_trigger/alert_resp2_0.yml" )
Variables ¶
View Source
var DefaultOptions = []Options{ { Name: "Administrative Level Notification", Description: `Configure how you are going to be notified for system events and host alerts, including levels 'warning', 'error', and 'critical'.`, Attributes: []Attribute{ { Name: "severity", Type: "string", Value: "W", Enabled: true, }, { Name: "severity", Type: "string", Value: "E", Enabled: true, }, { Name: "severity", Type: "string", Value: "C", Enabled: true, }, { Name: "category", Type: "string", Value: "DEV", Enabled: false, }, { Name: "category", Type: "string", Value: "CPU", Enabled: false, }, { Name: "category", Type: "string", Value: "DSK", Enabled: false, }, { Name: "category", Type: "string", Value: "MEM", Enabled: false, }, { Name: "category", Type: "string", Value: "NET", Enabled: false, }, { Name: "category", Type: "string", Value: "SRV", Enabled: false, }, { Name: "category", Type: "string", Value: "VRT", Enabled: false, }, }, Enabled: false, }, { Name: "Instance Level Notification", Description: `Configure how you are going to be notified for instance alerts, including levels 'warning', and 'critical'.`, Attributes: []Attribute{ { Name: "severity", Type: "string", Value: "W", Enabled: true, }, { Name: "severity", Type: "string", Value: "E", Enabled: false, }, { Name: "severity", Type: "string", Value: "C", Enabled: true, }, { Name: "category", Type: "string", Value: "DEV", Enabled: false, }, { Name: "category", Type: "string", Value: "CPU", Enabled: false, }, { Name: "category", Type: "string", Value: "DSK", Enabled: false, }, { Name: "category", Type: "string", Value: "MEM", Enabled: false, }, { Name: "category", Type: "string", Value: "NET", Enabled: false, }, { Name: "category", Type: "string", Value: "SRV", Enabled: false, }, { Name: "category", Type: "string", Value: "VRT", Enabled: false, }, }, Enabled: false, }, }
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct { Id string `json:"-" yaml:"-" bson:"id"` Name string `json:"name" yaml:"name" bson:"name"` Description string `json:"description" yaml:"description"` Match string `json:"-" yaml:"match"` Attributes []Attribute `json:"attributes" yaml:"-"` Response `json:"response" yaml:"response"` Enabled bool `json:"enabled" yaml:"enabled"` Status *status.Details `json:"status" yaml:"-" bson:"status"` }
func (*Options) GenMatchRule ¶
func (o *Options) GenMatchRule()
func (*Options) GenTaskUpdate ¶
func (*Options) HasEmailRecipients ¶
func (*Options) HasSlackChannels ¶
func (*Options) InitResponse ¶
func (o *Options) InitResponse()
func (*Options) InitStatus ¶
func (*Options) SetCompleted ¶
func (o *Options) SetCompleted()
type Policy ¶
type Policy struct { Name string `json:"name" yaml:"name"` Version string `json:"version" yaml:"version"` Enabled bool `json:"enabled" yaml:"enabled"` Triggers []Options `json:"triggers" yaml:"triggers"` }
func (*Policy) AppendTrigger ¶
func (*Policy) UpdateOrAppendTrigger ¶
Click to show internal directories.
Click to hide internal directories.