Documentation ¶
Index ¶
Constants ¶
View Source
const ( SYSTEM_HEALTHY string = "HEALTHY" SYSTEM_UNSTABLE string = "UNSTABLE" SYSTEM_CRITICAL string = "CRITICAL" )
View Source
const SlackUrl = "https://%s.slack.com/services/hooks/incoming-webhook?token=%s"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmailData ¶
type EmailData struct { ClusterName string SystemStatus string FailCount int WarnCount int PassCount int Nodes map[string]Messages }
func (EmailData) IsCritical ¶
type EmailNotifier ¶
type EmailNotifier struct { ClusterName string Template string Url string Port int Username string Password string SenderAlias string SenderEmail string Receivers []string }
func (*EmailNotifier) Notify ¶
func (emailNotifier *EmailNotifier) Notify(alerts Messages) bool
type InfluxdbNotifier ¶
type InfluxdbNotifier struct { Host string Username string Password string Database string SeriesName string }
func (*InfluxdbNotifier) Notify ¶
func (influxdb *InfluxdbNotifier) Notify(messages Messages) bool
type LogNotifier ¶
type LogNotifier struct {
LogFile string
}
func (*LogNotifier) Notify ¶
func (logNotifier *LogNotifier) Notify(alerts Messages) bool
type Message ¶
type Message struct { Node string Service string Check string Status string Output string Notes string Timestamp time.Time }
func (Message) IsCritical ¶
type SlackNotifier ¶
type SlackNotifier struct { ClusterName string `json:"-"` Team string `json:"-"` Token string `json:"-"` Channel string `json:"channel"` Username string `json:"username"` IconUrl string `json:"icon_url"` IconEmoji string `json:"icon_emoji"` Text string `json:"text"` }
func (*SlackNotifier) Notify ¶
func (slack *SlackNotifier) Notify(messages Messages) bool
Click to show internal directories.
Click to hide internal directories.