Documentation ¶
Index ¶
- Constants
- type AwsSnsNotifierConfig
- type Check
- type ChecksConfig
- type Consul
- type ConsulAlertClient
- func (c *ConsulAlertClient) AwsSnsConfig() *AwsSnsNotifierConfig
- func (c *ConsulAlertClient) CheckChangeThreshold() int
- func (c *ConsulAlertClient) CheckKeyExists(key string) bool
- func (c *ConsulAlertClient) CheckStatus(node, serviceId, checkId string) (status, output string)
- func (c *ConsulAlertClient) ChecksEnabled() bool
- func (c *ConsulAlertClient) CustomNotifiers() (customNotifs map[string]string)
- func (c *ConsulAlertClient) DeleteReminder(node string)
- func (c *ConsulAlertClient) EmailConfig() *EmailNotifierConfig
- func (c *ConsulAlertClient) EventHandlers(eventName string) []string
- func (c *ConsulAlertClient) EventsEnabled() bool
- func (c *ConsulAlertClient) GetProfileInfo(node, serviceID, checkID string) (notifiersList map[string]bool, interval int)
- func (c *ConsulAlertClient) GetReminders() []notifier.Message
- func (c *ConsulAlertClient) HipChatConfig() *HipChatNotifierConfig
- func (c *ConsulAlertClient) InfluxdbConfig() *InfluxdbNotifierConfig
- func (c *ConsulAlertClient) IsBlacklisted(check *Check) bool
- func (c *ConsulAlertClient) LoadConfig()
- func (c *ConsulAlertClient) LogConfig() *LogNotifierConfig
- func (c *ConsulAlertClient) NewAlerts() []Check
- func (c *ConsulAlertClient) NewAlertsWithFilter(nodeName string, serviceName string, checkName string, statuses []string, ...) []Check
- func (c *ConsulAlertClient) OpsGenieConfig() *OpsGenieNotifierConfig
- func (c *ConsulAlertClient) PagerDutyConfig() *PagerDutyNotifierConfig
- func (c *ConsulAlertClient) SetReminder(m notifier.Message)
- func (c *ConsulAlertClient) SlackConfig() *SlackNotifierConfig
- func (c *ConsulAlertClient) UpdateCheckData()
- func (c *ConsulAlertClient) VictorOpsConfig() *VictorOpsNotifierConfig
- type ConsulAlertConfig
- type EmailNotifierConfig
- type Event
- type EventsConfig
- type HipChatNotifierConfig
- type InfluxdbNotifierConfig
- type LogNotifierConfig
- type NotifiersConfig
- type OpsGenieNotifierConfig
- type PagerDutyNotifierConfig
- type ProfileInfo
- type SlackNotifierConfig
- type Status
- type VictorOpsNotifierConfig
Constants ¶
const ( ConfigTypeBool = iota ConfigTypeString ConfigTypeInt ConfigTypeStrArray )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AwsSnsNotifierConfig ¶ added in v0.4.0
type ChecksConfig ¶
type Consul ¶
type Consul interface { LoadConfig() EventsEnabled() bool ChecksEnabled() bool EventHandlers(eventName string) []string EmailConfig() *EmailNotifierConfig LogConfig() *LogNotifierConfig InfluxdbConfig() *InfluxdbNotifierConfig SlackConfig() *SlackNotifierConfig PagerDutyConfig() *PagerDutyNotifierConfig HipChatConfig() *HipChatNotifierConfig OpsGenieConfig() *OpsGenieNotifierConfig AwsSnsConfig() *AwsSnsNotifierConfig VictorOpsConfig() *VictorOpsNotifierConfig CheckChangeThreshold() int UpdateCheckData() NewAlerts() []Check NewAlertsWithFilter(node string, service string, checkId string, statuses []string, ignoreBlacklist bool) []Check IsBlacklisted(check *Check) bool CustomNotifiers() map[string]string CheckStatus(node, statusId, checkId string) (status, output string) CheckKeyExists(key string) bool GetProfileInfo(node, serviceID, checkID string) (notifiersList map[string]bool, interval int) GetReminders() []notifier.Message SetReminder(m notifier.Message) DeleteReminder(node string) }
Consul interface provides access to consul client
type ConsulAlertClient ¶
type ConsulAlertClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(address, dc, aclToken string) (*ConsulAlertClient, error)
func (*ConsulAlertClient) AwsSnsConfig ¶ added in v0.4.0
func (c *ConsulAlertClient) AwsSnsConfig() *AwsSnsNotifierConfig
func (*ConsulAlertClient) CheckChangeThreshold ¶
func (c *ConsulAlertClient) CheckChangeThreshold() int
func (*ConsulAlertClient) CheckKeyExists ¶ added in v0.3.2
func (c *ConsulAlertClient) CheckKeyExists(key string) bool
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() (customNotifs map[string]string)
CustomNotifiers returns a map of all custom notifiers and command path as the key value
func (*ConsulAlertClient) DeleteReminder ¶ added in v0.4.0
func (c *ConsulAlertClient) DeleteReminder(node string)
DeleteReminder deletes a reminder
func (*ConsulAlertClient) EmailConfig ¶
func (c *ConsulAlertClient) EmailConfig() *EmailNotifierConfig
EmailConfig exports the email config
func (*ConsulAlertClient) EventHandlers ¶
func (c *ConsulAlertClient) EventHandlers(eventName string) []string
func (*ConsulAlertClient) EventsEnabled ¶
func (c *ConsulAlertClient) EventsEnabled() bool
func (*ConsulAlertClient) GetProfileInfo ¶ added in v0.4.0
func (c *ConsulAlertClient) GetProfileInfo(node, serviceID, checkID string) (notifiersList map[string]bool, interval int)
GetProfileInfo returns profile info for check
func (*ConsulAlertClient) GetReminders ¶ added in v0.4.0
func (c *ConsulAlertClient) GetReminders() []notifier.Message
GetReminders returns list of reminders
func (*ConsulAlertClient) HipChatConfig ¶ added in v0.3.1
func (c *ConsulAlertClient) HipChatConfig() *HipChatNotifierConfig
func (*ConsulAlertClient) InfluxdbConfig ¶
func (c *ConsulAlertClient) InfluxdbConfig() *InfluxdbNotifierConfig
func (*ConsulAlertClient) IsBlacklisted ¶ added in v0.1.2
func (c *ConsulAlertClient) IsBlacklisted(check *Check) bool
IsBlacklisted gets the blacklist status of check
func (*ConsulAlertClient) LoadConfig ¶
func (c *ConsulAlertClient) LoadConfig()
func (*ConsulAlertClient) LogConfig ¶
func (c *ConsulAlertClient) LogConfig() *LogNotifierConfig
func (*ConsulAlertClient) NewAlerts ¶
func (c *ConsulAlertClient) NewAlerts() []Check
NewAlerts returns a list of checks marked for notification
func (*ConsulAlertClient) NewAlertsWithFilter ¶ added in v0.4.0
func (*ConsulAlertClient) OpsGenieConfig ¶ added in v0.3.3
func (c *ConsulAlertClient) OpsGenieConfig() *OpsGenieNotifierConfig
func (*ConsulAlertClient) PagerDutyConfig ¶ added in v0.1.2
func (c *ConsulAlertClient) PagerDutyConfig() *PagerDutyNotifierConfig
func (*ConsulAlertClient) SetReminder ¶ added in v0.4.0
func (c *ConsulAlertClient) SetReminder(m notifier.Message)
SetReminder sets a reminder
func (*ConsulAlertClient) SlackConfig ¶
func (c *ConsulAlertClient) SlackConfig() *SlackNotifierConfig
func (*ConsulAlertClient) UpdateCheckData ¶
func (c *ConsulAlertClient) UpdateCheckData()
func (*ConsulAlertClient) VictorOpsConfig ¶ added in v0.4.0
func (c *ConsulAlertClient) VictorOpsConfig() *VictorOpsNotifierConfig
VictorOpsConfig provides configuration for the VictorOps integration
type ConsulAlertConfig ¶
type ConsulAlertConfig struct { Checks *ChecksConfig Events *EventsConfig Notifiers *NotifiersConfig }
func DefaultAlertConfig ¶
func DefaultAlertConfig() *ConsulAlertConfig
DefaultAlertConfig loads default config settings
type EmailNotifierConfig ¶
type Event ¶
type Event struct { ID string Name string Payload []byte NodeFilter string ServiceFilter string TagFilter string Version uint LTime uint }
Event data from consul
type EventsConfig ¶
type HipChatNotifierConfig ¶ added in v0.3.1
type InfluxdbNotifierConfig ¶
type LogNotifierConfig ¶
type NotifiersConfig ¶
type NotifiersConfig struct { Email *EmailNotifierConfig Log *LogNotifierConfig Influxdb *InfluxdbNotifierConfig Slack *SlackNotifierConfig PagerDuty *PagerDutyNotifierConfig HipChat *HipChatNotifierConfig OpsGenie *OpsGenieNotifierConfig AwsSns *AwsSnsNotifierConfig VictorOps *VictorOpsNotifierConfig Custom []string }
type OpsGenieNotifierConfig ¶ added in v0.3.3
type PagerDutyNotifierConfig ¶ added in v0.1.2
type ProfileInfo ¶ added in v0.4.0
ProfileInfo is for reading in JSON from profile keys
type SlackNotifierConfig ¶
type VictorOpsNotifierConfig ¶ added in v0.4.0
VictorOpsNotifierConfig provides configuration options for VictorOps notifier