Documentation
¶
Index ¶
- Constants
- type Check
- type ChecksConfig
- type Consul
- type ConsulAlertClient
- func (c *ConsulAlertClient) CheckChangeThreshold() int
- func (c *ConsulAlertClient) CheckStatus(node, serviceId, checkId string) (status, output string)
- func (c *ConsulAlertClient) ChecksEnabled() bool
- func (c *ConsulAlertClient) CustomNotifiers() []string
- func (c *ConsulAlertClient) EmailConfig() *EmailNotifierConfig
- func (c *ConsulAlertClient) EventHandlers(eventName string) []string
- func (c *ConsulAlertClient) EventsEnabled() bool
- func (c *ConsulAlertClient) InfluxdbConfig() *InfluxdbNotifierConfig
- func (c *ConsulAlertClient) LoadConfig()
- func (c *ConsulAlertClient) LogConfig() *LogNotifierConfig
- func (c *ConsulAlertClient) NewAlerts() []Check
- func (c *ConsulAlertClient) SlackConfig() *SlackNotifierConfig
- func (c *ConsulAlertClient) UpdateCheckData()
- type ConsulAlertConfig
- type EmailNotifierConfig
- type Event
- type EventsConfig
- type InfluxdbNotifierConfig
- type LogNotifierConfig
- type NotifiersConfig
- type SlackNotifierConfig
- type Status
Constants ¶
View Source
const ( ConfigTypeBool = iota ConfigTypeString ConfigTypeInt ConfigTypeStrArray )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChecksConfig ¶
type Consul ¶
type Consul interface {
LoadConfig()
EventsEnabled() bool
ChecksEnabled() bool
EventHandlers(eventName string) []string
EmailConfig() *EmailNotifierConfig
LogConfig() *LogNotifierConfig
InfluxdbConfig() *InfluxdbNotifierConfig
SlackConfig() *SlackNotifierConfig
CheckChangeThreshold() int
UpdateCheckData()
NewAlerts() []Check
CustomNotifiers() []string
CheckStatus(node, statusId, checkId string) (status, output string)
}
type ConsulAlertClient ¶
type ConsulAlertClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(address, dc string) (*ConsulAlertClient, error)
func (*ConsulAlertClient) CheckChangeThreshold ¶
func (c *ConsulAlertClient) CheckChangeThreshold() int
func (*ConsulAlertClient) CheckStatus ¶
func (c *ConsulAlertClient) CheckStatus(node, serviceId, checkId string) (status, output string)
func (*ConsulAlertClient) ChecksEnabled ¶
func (c *ConsulAlertClient) ChecksEnabled() bool
func (*ConsulAlertClient) CustomNotifiers ¶
func (c *ConsulAlertClient) CustomNotifiers() []string
func (*ConsulAlertClient) EmailConfig ¶
func (c *ConsulAlertClient) EmailConfig() *EmailNotifierConfig
func (*ConsulAlertClient) EventHandlers ¶
func (c *ConsulAlertClient) EventHandlers(eventName string) []string
func (*ConsulAlertClient) EventsEnabled ¶
func (c *ConsulAlertClient) EventsEnabled() bool
func (*ConsulAlertClient) InfluxdbConfig ¶
func (c *ConsulAlertClient) InfluxdbConfig() *InfluxdbNotifierConfig
func (*ConsulAlertClient) LoadConfig ¶
func (c *ConsulAlertClient) LoadConfig()
func (*ConsulAlertClient) LogConfig ¶
func (c *ConsulAlertClient) LogConfig() *LogNotifierConfig
func (*ConsulAlertClient) NewAlerts ¶
func (c *ConsulAlertClient) NewAlerts() []Check
func (*ConsulAlertClient) SlackConfig ¶
func (c *ConsulAlertClient) SlackConfig() *SlackNotifierConfig
func (*ConsulAlertClient) UpdateCheckData ¶
func (c *ConsulAlertClient) UpdateCheckData()
type ConsulAlertConfig ¶
type ConsulAlertConfig struct {
Checks *ChecksConfig
Events *EventsConfig
Notifiers *NotifiersConfig
}
func DefaultAlertConfig ¶
func DefaultAlertConfig() *ConsulAlertConfig
type EmailNotifierConfig ¶
type EventsConfig ¶
type InfluxdbNotifierConfig ¶
type LogNotifierConfig ¶
type NotifiersConfig ¶
type NotifiersConfig struct {
Email *EmailNotifierConfig
Log *LogNotifierConfig
Influxdb *InfluxdbNotifierConfig
Slack *SlackNotifierConfig
Custom []string
}
type SlackNotifierConfig ¶
Click to show internal directories.
Click to hide internal directories.