Documentation ¶
Index ¶
- Constants
- type Check
- type ChecksConfig
- type Consul
- type ConsulAlertClient
- func (c *ConsulAlertClient) AwsSnsNotifier() *notifier.AwsSnsNotifier
- func (c *ConsulAlertClient) CheckChangeThreshold() int
- func (c *ConsulAlertClient) CheckKeyExists(key string) bool
- func (c *ConsulAlertClient) CheckKeyMatchesRegexp(regexpKey string, 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, checkid string)
- func (c *ConsulAlertClient) EmailNotifier() *notifier.EmailNotifier
- func (c *ConsulAlertClient) EventHandlers(eventName string) []string
- func (c *ConsulAlertClient) EventsEnabled() bool
- func (c *ConsulAlertClient) GetChangeThreshold(check *Check) int
- func (c *ConsulAlertClient) GetProfileInfo(node, serviceID, checkID, status string) ProfileInfo
- func (c *ConsulAlertClient) GetReminders() []notifier.Message
- func (c *ConsulAlertClient) HipChatNotifier() *notifier.HipChatNotifier
- func (c *ConsulAlertClient) HttpEndpointNotifier() *notifier.HttpEndpointNotifier
- func (c *ConsulAlertClient) ILertNotifier() *notifier.ILertNotifier
- func (c *ConsulAlertClient) InfluxdbNotifier() *notifier.InfluxdbNotifier
- func (c *ConsulAlertClient) IsBlacklisted(check *Check) bool
- func (c *ConsulAlertClient) LoadConfig()
- func (c *ConsulAlertClient) LogNotifier() *notifier.LogNotifier
- func (c *ConsulAlertClient) MattermostNotifier() *notifier.MattermostNotifier
- func (c *ConsulAlertClient) MattermostWebhookNotifier() *notifier.MattermostWebhookNotifier
- func (c *ConsulAlertClient) NewAlerts() []Check
- func (c *ConsulAlertClient) NewAlertsWithFilter(nodeName string, serviceName string, checkName string, statuses []string, ...) []Check
- func (c *ConsulAlertClient) OpsGenieNotifier() *notifier.OpsGenieNotifier
- func (c *ConsulAlertClient) PagerDutyNotifier() *notifier.PagerDutyNotifier
- func (c *ConsulAlertClient) SetReminder(m notifier.Message)
- func (c *ConsulAlertClient) SlackNotifier() *notifier.SlackNotifier
- func (c *ConsulAlertClient) UpdateCheckData()
- func (c *ConsulAlertClient) VictorOpsNotifier() *notifier.VictorOpsNotifier
- type ConsulAlertConfig
- type Event
- type EventsConfig
- type ProfileInfo
- type Status
Constants ¶
View Source
const ( ConfigTypeBool = iota ConfigTypeString ConfigTypeInt ConfigTypeStrArray ConfigTypeStrMap )
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 EmailNotifier() *notifier.EmailNotifier LogNotifier() *notifier.LogNotifier InfluxdbNotifier() *notifier.InfluxdbNotifier SlackNotifier() *notifier.SlackNotifier MattermostNotifier() *notifier.MattermostNotifier MattermostWebhookNotifier() *notifier.MattermostWebhookNotifier PagerDutyNotifier() *notifier.PagerDutyNotifier HipChatNotifier() *notifier.HipChatNotifier OpsGenieNotifier() *notifier.OpsGenieNotifier AwsSnsNotifier() *notifier.AwsSnsNotifier VictorOpsNotifier() *notifier.VictorOpsNotifier HttpEndpointNotifier() *notifier.HttpEndpointNotifier ILertNotifier() *notifier.ILertNotifier 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, status string) ProfileInfo GetReminders() []notifier.Message SetReminder(m notifier.Message) DeleteReminder(node string, checkid 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) AwsSnsNotifier ¶ added in v0.5.0
func (c *ConsulAlertClient) AwsSnsNotifier() *notifier.AwsSnsNotifier
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) CheckKeyMatchesRegexp ¶ added in v0.5.0
func (c *ConsulAlertClient) CheckKeyMatchesRegexp(regexpKey string, 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, checkid string)
DeleteReminder deletes a reminder
func (*ConsulAlertClient) EmailNotifier ¶ added in v0.5.0
func (c *ConsulAlertClient) EmailNotifier() *notifier.EmailNotifier
func (*ConsulAlertClient) EventHandlers ¶
func (c *ConsulAlertClient) EventHandlers(eventName string) []string
func (*ConsulAlertClient) EventsEnabled ¶
func (c *ConsulAlertClient) EventsEnabled() bool
func (*ConsulAlertClient) GetChangeThreshold ¶ added in v0.5.0
func (c *ConsulAlertClient) GetChangeThreshold(check *Check) int
GetChangeThreshold gets the node/service/check specific override for change threshold
func (*ConsulAlertClient) GetProfileInfo ¶ added in v0.4.0
func (c *ConsulAlertClient) GetProfileInfo(node, serviceID, checkID, status string) ProfileInfo
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) HipChatNotifier ¶ added in v0.5.0
func (c *ConsulAlertClient) HipChatNotifier() *notifier.HipChatNotifier
func (*ConsulAlertClient) HttpEndpointNotifier ¶ added in v0.6.0
func (c *ConsulAlertClient) HttpEndpointNotifier() *notifier.HttpEndpointNotifier
func (*ConsulAlertClient) ILertNotifier ¶ added in v0.6.0
func (c *ConsulAlertClient) ILertNotifier() *notifier.ILertNotifier
func (*ConsulAlertClient) InfluxdbNotifier ¶ added in v0.5.0
func (c *ConsulAlertClient) InfluxdbNotifier() *notifier.InfluxdbNotifier
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) LogNotifier ¶ added in v0.5.0
func (c *ConsulAlertClient) LogNotifier() *notifier.LogNotifier
func (*ConsulAlertClient) MattermostNotifier ¶ added in v0.5.0
func (c *ConsulAlertClient) MattermostNotifier() *notifier.MattermostNotifier
func (*ConsulAlertClient) MattermostWebhookNotifier ¶ added in v0.6.0
func (c *ConsulAlertClient) MattermostWebhookNotifier() *notifier.MattermostWebhookNotifier
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) OpsGenieNotifier ¶ added in v0.5.0
func (c *ConsulAlertClient) OpsGenieNotifier() *notifier.OpsGenieNotifier
func (*ConsulAlertClient) PagerDutyNotifier ¶ added in v0.5.0
func (c *ConsulAlertClient) PagerDutyNotifier() *notifier.PagerDutyNotifier
func (*ConsulAlertClient) SetReminder ¶ added in v0.4.0
func (c *ConsulAlertClient) SetReminder(m notifier.Message)
SetReminder sets a reminder
func (*ConsulAlertClient) SlackNotifier ¶ added in v0.5.0
func (c *ConsulAlertClient) SlackNotifier() *notifier.SlackNotifier
func (*ConsulAlertClient) UpdateCheckData ¶
func (c *ConsulAlertClient) UpdateCheckData()
func (*ConsulAlertClient) VictorOpsNotifier ¶ added in v0.5.0
func (c *ConsulAlertClient) VictorOpsNotifier() *notifier.VictorOpsNotifier
type ConsulAlertConfig ¶
type ConsulAlertConfig struct { Checks *ChecksConfig Events *EventsConfig Notifiers *notifier.Notifiers }
func DefaultAlertConfig ¶
func DefaultAlertConfig() *ConsulAlertConfig
DefaultAlertConfig loads default config settings
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 ProfileInfo ¶ added in v0.4.0
ProfileInfo is for reading in JSON from profile keys
Click to show internal directories.
Click to hide internal directories.