2013-07-26 01:04:53 +00:00
|
|
|
// Code generated by protoc-gen-go.
|
|
|
|
// source: config.proto
|
|
|
|
// DO NOT EDIT!
|
|
|
|
|
2015-04-10 17:12:24 +00:00
|
|
|
/*
|
|
|
|
Package io_prometheus_alertmanager is a generated protocol buffer package.
|
|
|
|
|
|
|
|
It is generated from these files:
|
|
|
|
config.proto
|
|
|
|
|
|
|
|
It has these top-level messages:
|
|
|
|
PagerDutyConfig
|
|
|
|
EmailConfig
|
|
|
|
PushoverConfig
|
|
|
|
HipChatConfig
|
2015-05-09 18:48:56 +00:00
|
|
|
SlackConfig
|
2015-05-18 16:07:56 +00:00
|
|
|
FlowdockConfig
|
2015-07-20 16:09:30 +00:00
|
|
|
OpsGenieConfig
|
2015-05-20 22:01:17 +00:00
|
|
|
WebhookConfig
|
2015-07-27 01:18:17 +00:00
|
|
|
AmazonSnsConfig
|
2015-04-10 17:12:24 +00:00
|
|
|
NotificationConfig
|
|
|
|
Filter
|
|
|
|
AggregationRule
|
|
|
|
InhibitRule
|
|
|
|
AlertManagerConfig
|
|
|
|
*/
|
2013-08-05 09:49:56 +00:00
|
|
|
package io_prometheus_alertmanager
|
2013-07-26 01:04:53 +00:00
|
|
|
|
2015-04-10 17:12:24 +00:00
|
|
|
import proto "github.com/golang/protobuf/proto"
|
2013-07-26 01:04:53 +00:00
|
|
|
import math "math"
|
|
|
|
|
2015-04-10 17:12:24 +00:00
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
2013-07-26 01:04:53 +00:00
|
|
|
var _ = proto.Marshal
|
|
|
|
var _ = math.Inf
|
|
|
|
|
2015-05-23 22:11:13 +00:00
|
|
|
// Format the message as "html" or "text".
|
|
|
|
type HipChatConfig_MessageFormat int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
HipChatConfig_HTML HipChatConfig_MessageFormat = 0
|
|
|
|
HipChatConfig_TEXT HipChatConfig_MessageFormat = 1
|
|
|
|
)
|
|
|
|
|
|
|
|
var HipChatConfig_MessageFormat_name = map[int32]string{
|
|
|
|
0: "HTML",
|
|
|
|
1: "TEXT",
|
|
|
|
}
|
|
|
|
var HipChatConfig_MessageFormat_value = map[string]int32{
|
|
|
|
"HTML": 0,
|
|
|
|
"TEXT": 1,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x HipChatConfig_MessageFormat) Enum() *HipChatConfig_MessageFormat {
|
|
|
|
p := new(HipChatConfig_MessageFormat)
|
|
|
|
*p = x
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
func (x HipChatConfig_MessageFormat) String() string {
|
|
|
|
return proto.EnumName(HipChatConfig_MessageFormat_name, int32(x))
|
|
|
|
}
|
|
|
|
func (x *HipChatConfig_MessageFormat) UnmarshalJSON(data []byte) error {
|
|
|
|
value, err := proto.UnmarshalJSONEnum(HipChatConfig_MessageFormat_value, data, "HipChatConfig_MessageFormat")
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
*x = HipChatConfig_MessageFormat(value)
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2015-02-16 20:11:00 +00:00
|
|
|
// Configuration for notification via PagerDuty.
|
2013-07-29 16:43:01 +00:00
|
|
|
type PagerDutyConfig struct {
|
2015-02-16 20:11:00 +00:00
|
|
|
// PagerDuty service key, see:
|
|
|
|
// http://developer.pagerduty.com/documentation/integration/events
|
2013-07-29 16:43:01 +00:00
|
|
|
ServiceKey *string `protobuf:"bytes,1,opt,name=service_key" json:"service_key,omitempty"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *PagerDutyConfig) Reset() { *m = PagerDutyConfig{} }
|
|
|
|
func (m *PagerDutyConfig) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*PagerDutyConfig) ProtoMessage() {}
|
|
|
|
|
|
|
|
func (m *PagerDutyConfig) GetServiceKey() string {
|
|
|
|
if m != nil && m.ServiceKey != nil {
|
|
|
|
return *m.ServiceKey
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2015-02-16 20:11:00 +00:00
|
|
|
// Configuration for notification via mail.
|
2013-07-29 16:43:01 +00:00
|
|
|
type EmailConfig struct {
|
2015-02-16 20:11:00 +00:00
|
|
|
// Email address to notify.
|
2015-04-24 13:17:49 +00:00
|
|
|
Email *string `protobuf:"bytes,1,opt,name=email" json:"email,omitempty"`
|
|
|
|
// Notify when resolved.
|
|
|
|
SendResolved *bool `protobuf:"varint,2,opt,name=send_resolved,def=0" json:"send_resolved,omitempty"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
2013-07-29 16:43:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *EmailConfig) Reset() { *m = EmailConfig{} }
|
|
|
|
func (m *EmailConfig) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*EmailConfig) ProtoMessage() {}
|
|
|
|
|
2015-04-24 13:17:49 +00:00
|
|
|
const Default_EmailConfig_SendResolved bool = false
|
|
|
|
|
2013-07-29 16:43:01 +00:00
|
|
|
func (m *EmailConfig) GetEmail() string {
|
|
|
|
if m != nil && m.Email != nil {
|
|
|
|
return *m.Email
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2015-04-24 13:17:49 +00:00
|
|
|
func (m *EmailConfig) GetSendResolved() bool {
|
|
|
|
if m != nil && m.SendResolved != nil {
|
|
|
|
return *m.SendResolved
|
|
|
|
}
|
|
|
|
return Default_EmailConfig_SendResolved
|
|
|
|
}
|
|
|
|
|
2015-02-16 20:11:00 +00:00
|
|
|
// Configuration for notification via pushover.net.
|
|
|
|
type PushoverConfig struct {
|
2015-04-24 13:17:49 +00:00
|
|
|
// Pushover token.
|
2015-02-16 20:11:00 +00:00
|
|
|
Token *string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"`
|
2015-04-24 13:17:49 +00:00
|
|
|
// Pushover user_key.
|
|
|
|
UserKey *string `protobuf:"bytes,2,opt,name=user_key" json:"user_key,omitempty"`
|
|
|
|
// Notify when resolved.
|
|
|
|
SendResolved *bool `protobuf:"varint,3,opt,name=send_resolved,def=0" json:"send_resolved,omitempty"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
2015-02-16 20:11:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *PushoverConfig) Reset() { *m = PushoverConfig{} }
|
|
|
|
func (m *PushoverConfig) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*PushoverConfig) ProtoMessage() {}
|
|
|
|
|
2015-04-24 13:17:49 +00:00
|
|
|
const Default_PushoverConfig_SendResolved bool = false
|
|
|
|
|
2015-02-16 20:11:00 +00:00
|
|
|
func (m *PushoverConfig) GetToken() string {
|
|
|
|
if m != nil && m.Token != nil {
|
|
|
|
return *m.Token
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *PushoverConfig) GetUserKey() string {
|
|
|
|
if m != nil && m.UserKey != nil {
|
|
|
|
return *m.UserKey
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2015-04-24 13:17:49 +00:00
|
|
|
func (m *PushoverConfig) GetSendResolved() bool {
|
|
|
|
if m != nil && m.SendResolved != nil {
|
|
|
|
return *m.SendResolved
|
|
|
|
}
|
|
|
|
return Default_PushoverConfig_SendResolved
|
|
|
|
}
|
|
|
|
|
|
|
|
// Configuration for notification via HipChat.
|
2015-04-10 17:12:24 +00:00
|
|
|
type HipChatConfig struct {
|
2015-04-24 13:17:49 +00:00
|
|
|
// HipChat auth token, (https://www.hipchat.com/docs/api/auth).
|
2015-04-10 17:12:24 +00:00
|
|
|
AuthToken *string `protobuf:"bytes,1,opt,name=auth_token" json:"auth_token,omitempty"`
|
2015-04-24 13:17:49 +00:00
|
|
|
// HipChat room id, (https://www.hipchat.com/rooms/ids).
|
2015-04-10 17:12:24 +00:00
|
|
|
RoomId *int32 `protobuf:"varint,2,opt,name=room_id" json:"room_id,omitempty"`
|
2015-04-24 13:17:49 +00:00
|
|
|
// Color of message when triggered.
|
2015-04-10 17:12:24 +00:00
|
|
|
Color *string `protobuf:"bytes,3,opt,name=color,def=purple" json:"color,omitempty"`
|
2015-04-24 13:17:49 +00:00
|
|
|
// Color of message when resolved.
|
|
|
|
ColorResolved *string `protobuf:"bytes,5,opt,name=color_resolved,def=green" json:"color_resolved,omitempty"`
|
|
|
|
// Should this message notify or not.
|
|
|
|
Notify *bool `protobuf:"varint,4,opt,name=notify,def=0" json:"notify,omitempty"`
|
|
|
|
// Notify when resolved.
|
2015-05-23 22:11:13 +00:00
|
|
|
SendResolved *bool `protobuf:"varint,6,opt,name=send_resolved,def=0" json:"send_resolved,omitempty"`
|
|
|
|
// Prefix to be put in front of the message (useful for @mentions, etc.).
|
|
|
|
Prefix *string `protobuf:"bytes,7,opt,name=prefix,def=" json:"prefix,omitempty"`
|
|
|
|
MessageFormat *HipChatConfig_MessageFormat `protobuf:"varint,8,opt,name=message_format,enum=io.prometheus.alertmanager.HipChatConfig_MessageFormat,def=0" json:"message_format,omitempty"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
2015-04-10 17:12:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *HipChatConfig) Reset() { *m = HipChatConfig{} }
|
|
|
|
func (m *HipChatConfig) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*HipChatConfig) ProtoMessage() {}
|
|
|
|
|
|
|
|
const Default_HipChatConfig_Color string = "purple"
|
2015-04-24 13:17:49 +00:00
|
|
|
const Default_HipChatConfig_ColorResolved string = "green"
|
2015-04-10 17:12:24 +00:00
|
|
|
const Default_HipChatConfig_Notify bool = false
|
2015-04-24 13:17:49 +00:00
|
|
|
const Default_HipChatConfig_SendResolved bool = false
|
2015-05-23 22:11:13 +00:00
|
|
|
const Default_HipChatConfig_MessageFormat HipChatConfig_MessageFormat = HipChatConfig_HTML
|
2015-04-10 17:12:24 +00:00
|
|
|
|
|
|
|
func (m *HipChatConfig) GetAuthToken() string {
|
|
|
|
if m != nil && m.AuthToken != nil {
|
|
|
|
return *m.AuthToken
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *HipChatConfig) GetRoomId() int32 {
|
|
|
|
if m != nil && m.RoomId != nil {
|
|
|
|
return *m.RoomId
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *HipChatConfig) GetColor() string {
|
|
|
|
if m != nil && m.Color != nil {
|
|
|
|
return *m.Color
|
|
|
|
}
|
|
|
|
return Default_HipChatConfig_Color
|
|
|
|
}
|
|
|
|
|
2015-04-24 13:17:49 +00:00
|
|
|
func (m *HipChatConfig) GetColorResolved() string {
|
|
|
|
if m != nil && m.ColorResolved != nil {
|
|
|
|
return *m.ColorResolved
|
|
|
|
}
|
|
|
|
return Default_HipChatConfig_ColorResolved
|
|
|
|
}
|
|
|
|
|
2015-04-10 17:12:24 +00:00
|
|
|
func (m *HipChatConfig) GetNotify() bool {
|
|
|
|
if m != nil && m.Notify != nil {
|
|
|
|
return *m.Notify
|
|
|
|
}
|
|
|
|
return Default_HipChatConfig_Notify
|
|
|
|
}
|
|
|
|
|
2015-04-24 13:17:49 +00:00
|
|
|
func (m *HipChatConfig) GetSendResolved() bool {
|
|
|
|
if m != nil && m.SendResolved != nil {
|
|
|
|
return *m.SendResolved
|
|
|
|
}
|
|
|
|
return Default_HipChatConfig_SendResolved
|
|
|
|
}
|
|
|
|
|
2015-05-23 22:11:13 +00:00
|
|
|
func (m *HipChatConfig) GetPrefix() string {
|
|
|
|
if m != nil && m.Prefix != nil {
|
|
|
|
return *m.Prefix
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *HipChatConfig) GetMessageFormat() HipChatConfig_MessageFormat {
|
|
|
|
if m != nil && m.MessageFormat != nil {
|
|
|
|
return *m.MessageFormat
|
|
|
|
}
|
|
|
|
return Default_HipChatConfig_MessageFormat
|
|
|
|
}
|
|
|
|
|
2015-05-09 18:48:56 +00:00
|
|
|
// Configuration for notification via Slack.
|
|
|
|
type SlackConfig struct {
|
2015-05-20 22:01:17 +00:00
|
|
|
// Slack webhook URL, (https://api.slack.com/incoming-webhooks).
|
2015-05-09 18:48:56 +00:00
|
|
|
WebhookUrl *string `protobuf:"bytes,1,opt,name=webhook_url" json:"webhook_url,omitempty"`
|
|
|
|
// Slack channel override, (like #other-channel or @username).
|
|
|
|
Channel *string `protobuf:"bytes,2,opt,name=channel" json:"channel,omitempty"`
|
|
|
|
// Color of message when triggered.
|
|
|
|
Color *string `protobuf:"bytes,3,opt,name=color,def=warning" json:"color,omitempty"`
|
|
|
|
// Color of message when resolved.
|
|
|
|
ColorResolved *string `protobuf:"bytes,4,opt,name=color_resolved,def=good" json:"color_resolved,omitempty"`
|
|
|
|
// Notify when resolved.
|
|
|
|
SendResolved *bool `protobuf:"varint,5,opt,name=send_resolved,def=0" json:"send_resolved,omitempty"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SlackConfig) Reset() { *m = SlackConfig{} }
|
|
|
|
func (m *SlackConfig) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*SlackConfig) ProtoMessage() {}
|
|
|
|
|
|
|
|
const Default_SlackConfig_Color string = "warning"
|
|
|
|
const Default_SlackConfig_ColorResolved string = "good"
|
|
|
|
const Default_SlackConfig_SendResolved bool = false
|
|
|
|
|
|
|
|
func (m *SlackConfig) GetWebhookUrl() string {
|
|
|
|
if m != nil && m.WebhookUrl != nil {
|
|
|
|
return *m.WebhookUrl
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SlackConfig) GetChannel() string {
|
|
|
|
if m != nil && m.Channel != nil {
|
|
|
|
return *m.Channel
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SlackConfig) GetColor() string {
|
|
|
|
if m != nil && m.Color != nil {
|
|
|
|
return *m.Color
|
|
|
|
}
|
|
|
|
return Default_SlackConfig_Color
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SlackConfig) GetColorResolved() string {
|
|
|
|
if m != nil && m.ColorResolved != nil {
|
|
|
|
return *m.ColorResolved
|
|
|
|
}
|
|
|
|
return Default_SlackConfig_ColorResolved
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SlackConfig) GetSendResolved() bool {
|
|
|
|
if m != nil && m.SendResolved != nil {
|
|
|
|
return *m.SendResolved
|
|
|
|
}
|
|
|
|
return Default_SlackConfig_SendResolved
|
|
|
|
}
|
|
|
|
|
2015-05-20 22:01:17 +00:00
|
|
|
// Configuration for notification via Flowdock.
|
2015-05-18 16:07:56 +00:00
|
|
|
type FlowdockConfig struct {
|
2015-05-19 11:31:06 +00:00
|
|
|
// Flowdock flow API token.
|
2015-05-19 08:37:22 +00:00
|
|
|
ApiToken *string `protobuf:"bytes,1,opt,name=api_token" json:"api_token,omitempty"`
|
2015-05-19 11:31:06 +00:00
|
|
|
// Flowdock from_address.
|
2015-05-19 08:37:22 +00:00
|
|
|
FromAddress *string `protobuf:"bytes,2,opt,name=from_address" json:"from_address,omitempty"`
|
2015-05-19 11:31:06 +00:00
|
|
|
// Flowdock flow tags.
|
2015-05-19 08:37:22 +00:00
|
|
|
Tag []string `protobuf:"bytes,3,rep,name=tag" json:"tag,omitempty"`
|
|
|
|
// Notify when resolved.
|
|
|
|
SendResolved *bool `protobuf:"varint,4,opt,name=send_resolved,def=0" json:"send_resolved,omitempty"`
|
2015-05-18 16:07:56 +00:00
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *FlowdockConfig) Reset() { *m = FlowdockConfig{} }
|
|
|
|
func (m *FlowdockConfig) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*FlowdockConfig) ProtoMessage() {}
|
|
|
|
|
|
|
|
const Default_FlowdockConfig_SendResolved bool = false
|
|
|
|
|
|
|
|
func (m *FlowdockConfig) GetApiToken() string {
|
|
|
|
if m != nil && m.ApiToken != nil {
|
|
|
|
return *m.ApiToken
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *FlowdockConfig) GetFromAddress() string {
|
|
|
|
if m != nil && m.FromAddress != nil {
|
|
|
|
return *m.FromAddress
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2015-05-19 08:37:22 +00:00
|
|
|
func (m *FlowdockConfig) GetTag() []string {
|
2015-05-18 16:07:56 +00:00
|
|
|
if m != nil {
|
2015-05-19 08:37:22 +00:00
|
|
|
return m.Tag
|
2015-05-18 16:07:56 +00:00
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *FlowdockConfig) GetSendResolved() bool {
|
|
|
|
if m != nil && m.SendResolved != nil {
|
|
|
|
return *m.SendResolved
|
|
|
|
}
|
|
|
|
return Default_FlowdockConfig_SendResolved
|
|
|
|
}
|
|
|
|
|
2015-07-20 16:09:30 +00:00
|
|
|
// Configuration for notification via OpsGenie.
|
|
|
|
type OpsGenieConfig struct {
|
|
|
|
// OpsGenie API token.
|
|
|
|
ApiKey *string `protobuf:"bytes,1,opt,name=api_key" json:"api_key,omitempty"`
|
|
|
|
// List of team names which will be responsible for the alert.
|
|
|
|
Teams []string `protobuf:"bytes,2,rep,name=teams" json:"teams,omitempty"`
|
|
|
|
// List of labels that have their values converted to tags.
|
|
|
|
LabelsToTags []string `protobuf:"bytes,3,rep,name=labels_to_tags" json:"labels_to_tags,omitempty"`
|
|
|
|
// Notify when resolved.
|
|
|
|
SendResolved *bool `protobuf:"varint,4,opt,name=send_resolved,def=0" json:"send_resolved,omitempty"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *OpsGenieConfig) Reset() { *m = OpsGenieConfig{} }
|
|
|
|
func (m *OpsGenieConfig) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*OpsGenieConfig) ProtoMessage() {}
|
|
|
|
|
|
|
|
const Default_OpsGenieConfig_SendResolved bool = false
|
|
|
|
|
|
|
|
func (m *OpsGenieConfig) GetApiKey() string {
|
|
|
|
if m != nil && m.ApiKey != nil {
|
|
|
|
return *m.ApiKey
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *OpsGenieConfig) GetTeams() []string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Teams
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *OpsGenieConfig) GetLabelsToTags() []string {
|
|
|
|
if m != nil {
|
|
|
|
return m.LabelsToTags
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *OpsGenieConfig) GetSendResolved() bool {
|
|
|
|
if m != nil && m.SendResolved != nil {
|
|
|
|
return *m.SendResolved
|
|
|
|
}
|
|
|
|
return Default_OpsGenieConfig_SendResolved
|
|
|
|
}
|
|
|
|
|
2015-05-20 22:01:17 +00:00
|
|
|
// Configuration for notification via generic webhook.
|
|
|
|
type WebhookConfig struct {
|
|
|
|
// URL to send POST request to.
|
|
|
|
Url *string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
|
|
|
|
// Notify when resolved.
|
|
|
|
SendResolved *bool `protobuf:"varint,2,opt,name=send_resolved,def=0" json:"send_resolved,omitempty"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *WebhookConfig) Reset() { *m = WebhookConfig{} }
|
|
|
|
func (m *WebhookConfig) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*WebhookConfig) ProtoMessage() {}
|
|
|
|
|
|
|
|
const Default_WebhookConfig_SendResolved bool = false
|
|
|
|
|
|
|
|
func (m *WebhookConfig) GetUrl() string {
|
|
|
|
if m != nil && m.Url != nil {
|
|
|
|
return *m.Url
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *WebhookConfig) GetSendResolved() bool {
|
|
|
|
if m != nil && m.SendResolved != nil {
|
|
|
|
return *m.SendResolved
|
|
|
|
}
|
|
|
|
return Default_WebhookConfig_SendResolved
|
|
|
|
}
|
|
|
|
|
2015-07-27 01:18:17 +00:00
|
|
|
// Configuration for notification via Amazon SNS.
|
|
|
|
type AmazonSnsConfig struct {
|
|
|
|
// SNS Topic ARN.
|
|
|
|
TopicArn *string `protobuf:"bytes,1,opt,name=topic_arn" json:"topic_arn,omitempty"`
|
|
|
|
// Notify when resolved
|
|
|
|
SendResolved *bool `protobuf:"varint,2,opt,name=send_resolved,def=0" json:"send_resolved,omitempty"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AmazonSnsConfig) Reset() { *m = AmazonSnsConfig{} }
|
|
|
|
func (m *AmazonSnsConfig) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*AmazonSnsConfig) ProtoMessage() {}
|
|
|
|
|
|
|
|
const Default_AmazonSnsConfig_SendResolved bool = false
|
|
|
|
|
|
|
|
func (m *AmazonSnsConfig) GetTopicArn() string {
|
|
|
|
if m != nil && m.TopicArn != nil {
|
|
|
|
return *m.TopicArn
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AmazonSnsConfig) GetSendResolved() bool {
|
|
|
|
if m != nil && m.SendResolved != nil {
|
|
|
|
return *m.SendResolved
|
|
|
|
}
|
|
|
|
return Default_AmazonSnsConfig_SendResolved
|
|
|
|
}
|
|
|
|
|
2015-02-16 20:11:00 +00:00
|
|
|
// Notification configuration definition.
|
2013-07-29 16:43:01 +00:00
|
|
|
type NotificationConfig struct {
|
2015-02-16 20:11:00 +00:00
|
|
|
// Name of this NotificationConfig. Referenced from AggregationRule.
|
|
|
|
Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
|
|
|
|
// Zero or more PagerDuty notification configurations.
|
|
|
|
PagerdutyConfig []*PagerDutyConfig `protobuf:"bytes,2,rep,name=pagerduty_config" json:"pagerduty_config,omitempty"`
|
|
|
|
// Zero or more email notification configurations.
|
|
|
|
EmailConfig []*EmailConfig `protobuf:"bytes,3,rep,name=email_config" json:"email_config,omitempty"`
|
|
|
|
// Zero or more pushover notification configurations.
|
2015-04-10 17:12:24 +00:00
|
|
|
PushoverConfig []*PushoverConfig `protobuf:"bytes,4,rep,name=pushover_config" json:"pushover_config,omitempty"`
|
2015-04-24 13:17:49 +00:00
|
|
|
// Zero or more hipchat notification configurations.
|
2015-05-09 18:48:56 +00:00
|
|
|
HipchatConfig []*HipChatConfig `protobuf:"bytes,5,rep,name=hipchat_config" json:"hipchat_config,omitempty"`
|
|
|
|
// Zero or more slack notification configurations.
|
2015-05-18 16:07:56 +00:00
|
|
|
SlackConfig []*SlackConfig `protobuf:"bytes,6,rep,name=slack_config" json:"slack_config,omitempty"`
|
|
|
|
// Zero or more Flowdock notification configurations.
|
2015-05-20 22:01:17 +00:00
|
|
|
FlowdockConfig []*FlowdockConfig `protobuf:"bytes,7,rep,name=flowdock_config" json:"flowdock_config,omitempty"`
|
|
|
|
// Zero or more generic web hook notification configurations.
|
2015-07-20 16:09:30 +00:00
|
|
|
WebhookConfig []*WebhookConfig `protobuf:"bytes,8,rep,name=webhook_config" json:"webhook_config,omitempty"`
|
|
|
|
// Zero or more OpsGenieConfig notification configurations.
|
|
|
|
OpsgenieConfig []*OpsGenieConfig `protobuf:"bytes,9,rep,name=opsgenie_config" json:"opsgenie_config,omitempty"`
|
2015-07-27 01:18:17 +00:00
|
|
|
// Zero or more Amazon SNS notification configurations.
|
|
|
|
AmazonSnsConfig []*AmazonSnsConfig `protobuf:"bytes,10,rep,name=amazon_sns_config" json:"amazon_sns_config,omitempty"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
2013-07-29 16:43:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *NotificationConfig) Reset() { *m = NotificationConfig{} }
|
|
|
|
func (m *NotificationConfig) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*NotificationConfig) ProtoMessage() {}
|
|
|
|
|
|
|
|
func (m *NotificationConfig) GetName() string {
|
|
|
|
if m != nil && m.Name != nil {
|
|
|
|
return *m.Name
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *NotificationConfig) GetPagerdutyConfig() []*PagerDutyConfig {
|
|
|
|
if m != nil {
|
|
|
|
return m.PagerdutyConfig
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *NotificationConfig) GetEmailConfig() []*EmailConfig {
|
|
|
|
if m != nil {
|
|
|
|
return m.EmailConfig
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2015-02-16 20:11:00 +00:00
|
|
|
func (m *NotificationConfig) GetPushoverConfig() []*PushoverConfig {
|
|
|
|
if m != nil {
|
|
|
|
return m.PushoverConfig
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2015-04-10 17:12:24 +00:00
|
|
|
func (m *NotificationConfig) GetHipchatConfig() []*HipChatConfig {
|
|
|
|
if m != nil {
|
|
|
|
return m.HipchatConfig
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2015-05-09 18:48:56 +00:00
|
|
|
func (m *NotificationConfig) GetSlackConfig() []*SlackConfig {
|
|
|
|
if m != nil {
|
|
|
|
return m.SlackConfig
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2015-05-18 16:07:56 +00:00
|
|
|
func (m *NotificationConfig) GetFlowdockConfig() []*FlowdockConfig {
|
|
|
|
if m != nil {
|
|
|
|
return m.FlowdockConfig
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2015-05-20 22:01:17 +00:00
|
|
|
func (m *NotificationConfig) GetWebhookConfig() []*WebhookConfig {
|
|
|
|
if m != nil {
|
|
|
|
return m.WebhookConfig
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2015-07-20 16:09:30 +00:00
|
|
|
func (m *NotificationConfig) GetOpsgenieConfig() []*OpsGenieConfig {
|
|
|
|
if m != nil {
|
|
|
|
return m.OpsgenieConfig
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2015-07-27 01:18:17 +00:00
|
|
|
func (m *NotificationConfig) GetAmazonSnsConfig() []*AmazonSnsConfig {
|
|
|
|
if m != nil {
|
|
|
|
return m.AmazonSnsConfig
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2015-02-16 20:11:00 +00:00
|
|
|
// A regex-based label filter used in aggregations.
|
2013-07-26 01:04:53 +00:00
|
|
|
type Filter struct {
|
2015-02-16 20:11:00 +00:00
|
|
|
// The regex matching the label name.
|
|
|
|
NameRe *string `protobuf:"bytes,1,opt,name=name_re" json:"name_re,omitempty"`
|
|
|
|
// The regex matching the label value.
|
2013-07-26 11:02:51 +00:00
|
|
|
ValueRe *string `protobuf:"bytes,2,opt,name=value_re" json:"value_re,omitempty"`
|
2013-07-26 01:04:53 +00:00
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Filter) Reset() { *m = Filter{} }
|
|
|
|
func (m *Filter) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Filter) ProtoMessage() {}
|
|
|
|
|
|
|
|
func (m *Filter) GetNameRe() string {
|
|
|
|
if m != nil && m.NameRe != nil {
|
|
|
|
return *m.NameRe
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Filter) GetValueRe() string {
|
|
|
|
if m != nil && m.ValueRe != nil {
|
|
|
|
return *m.ValueRe
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2015-02-16 20:11:00 +00:00
|
|
|
// Grouping and notification setting definitions for alerts.
|
2013-07-26 01:04:53 +00:00
|
|
|
type AggregationRule struct {
|
2015-02-16 20:11:00 +00:00
|
|
|
// Filters that define which alerts are matched by this AggregationRule.
|
|
|
|
Filter []*Filter `protobuf:"bytes,1,rep,name=filter" json:"filter,omitempty"`
|
|
|
|
// How many seconds to wait before resending a notification for a specific alert.
|
|
|
|
RepeatRateSeconds *int32 `protobuf:"varint,2,opt,name=repeat_rate_seconds,def=7200" json:"repeat_rate_seconds,omitempty"`
|
|
|
|
// Notification configuration to use for this AggregationRule, referenced by
|
|
|
|
// their name.
|
|
|
|
NotificationConfigName *string `protobuf:"bytes,3,opt,name=notification_config_name" json:"notification_config_name,omitempty"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
2013-07-26 01:04:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AggregationRule) Reset() { *m = AggregationRule{} }
|
|
|
|
func (m *AggregationRule) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*AggregationRule) ProtoMessage() {}
|
|
|
|
|
2013-07-26 11:02:51 +00:00
|
|
|
const Default_AggregationRule_RepeatRateSeconds int32 = 7200
|
2013-07-26 01:04:53 +00:00
|
|
|
|
|
|
|
func (m *AggregationRule) GetFilter() []*Filter {
|
|
|
|
if m != nil {
|
|
|
|
return m.Filter
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2013-07-26 11:02:51 +00:00
|
|
|
func (m *AggregationRule) GetRepeatRateSeconds() int32 {
|
|
|
|
if m != nil && m.RepeatRateSeconds != nil {
|
|
|
|
return *m.RepeatRateSeconds
|
2013-07-26 01:04:53 +00:00
|
|
|
}
|
2013-07-26 11:02:51 +00:00
|
|
|
return Default_AggregationRule_RepeatRateSeconds
|
2013-07-26 01:04:53 +00:00
|
|
|
}
|
|
|
|
|
2013-07-30 12:49:16 +00:00
|
|
|
func (m *AggregationRule) GetNotificationConfigName() string {
|
|
|
|
if m != nil && m.NotificationConfigName != nil {
|
|
|
|
return *m.NotificationConfigName
|
2013-07-29 16:43:01 +00:00
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2015-02-16 20:11:00 +00:00
|
|
|
// An InhibitRule specifies that a class of (source) alerts should inhibit
|
|
|
|
// notifications for another class of (target) alerts if all specified matching
|
|
|
|
// labels are equal between the two alerts. This may be used to inhibit alerts
|
|
|
|
// from sending notifications if their meaning is logically a subset of a
|
|
|
|
// higher-level alert.
|
|
|
|
//
|
|
|
|
// For example, if an entire job is down, there is little sense in sending a
|
|
|
|
// notification for every single instance of said job being down. This could be
|
|
|
|
// expressed as the following inhibit rule:
|
|
|
|
//
|
|
|
|
// inhibit_rule {
|
|
|
|
// # Select all source alerts that are candidates for being inhibitors. All
|
|
|
|
// # supplied source filters have to match in order to select a source alert.
|
|
|
|
// source_filter: {
|
|
|
|
// name_re: "alertname"
|
|
|
|
// value_re: "JobDown"
|
|
|
|
// }
|
|
|
|
// source_filter: {
|
|
|
|
// name_re: "service"
|
|
|
|
// value_re: "api"
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// # Select all target alerts that are candidates for being inhibited. All
|
|
|
|
// # supplied target filters have to match in order to select a target alert.
|
|
|
|
// target_filter: {
|
|
|
|
// name_re: "alertname"
|
|
|
|
// value_re: "InstanceDown"
|
|
|
|
// }
|
|
|
|
// target_filter: {
|
|
|
|
// name_re: "service"
|
|
|
|
// value_re: "api"
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// # A target alert only actually inhibits a source alert if they match on
|
|
|
|
// # these labels. I.e. the alerts needs to fire for the same job in the same
|
|
|
|
// # zone for the inhibit to take effect between them.
|
|
|
|
// match_on: "job"
|
|
|
|
// match_on: "zone"
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// In this example, when JobDown is firing for
|
|
|
|
//
|
|
|
|
// JobDown{zone="aa",job="test",service="api"}
|
|
|
|
//
|
|
|
|
// ...it would inhibit an InstanceDown alert for
|
|
|
|
//
|
|
|
|
// InstanceDown{zone="aa",job="test",instance="1",service="api"}
|
|
|
|
//
|
|
|
|
// However, an InstanceDown alert for another zone:
|
|
|
|
//
|
|
|
|
// {zone="ab",job="test",instance="1",service="api"}
|
|
|
|
//
|
|
|
|
// ...would still fire.
|
2013-08-27 13:32:08 +00:00
|
|
|
type InhibitRule struct {
|
2015-02-16 20:11:00 +00:00
|
|
|
// The set of Filters which define the group of source alerts (which inhibit
|
|
|
|
// the target alerts).
|
|
|
|
SourceFilter []*Filter `protobuf:"bytes,1,rep,name=source_filter" json:"source_filter,omitempty"`
|
|
|
|
// The set of Filters which define the group of target alerts (which are
|
|
|
|
// inhibited by the source alerts).
|
|
|
|
TargetFilter []*Filter `protobuf:"bytes,2,rep,name=target_filter" json:"target_filter,omitempty"`
|
|
|
|
// A set of label names whose label values need to be identical in source and
|
|
|
|
// target alerts in order for the inhibition to take effect.
|
|
|
|
MatchOn []string `protobuf:"bytes,3,rep,name=match_on" json:"match_on,omitempty"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
2013-08-27 13:32:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *InhibitRule) Reset() { *m = InhibitRule{} }
|
|
|
|
func (m *InhibitRule) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*InhibitRule) ProtoMessage() {}
|
|
|
|
|
|
|
|
func (m *InhibitRule) GetSourceFilter() []*Filter {
|
|
|
|
if m != nil {
|
|
|
|
return m.SourceFilter
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *InhibitRule) GetTargetFilter() []*Filter {
|
|
|
|
if m != nil {
|
|
|
|
return m.TargetFilter
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *InhibitRule) GetMatchOn() []string {
|
|
|
|
if m != nil {
|
|
|
|
return m.MatchOn
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2015-02-16 20:11:00 +00:00
|
|
|
// Global alert manager configuration.
|
2013-07-26 01:04:53 +00:00
|
|
|
type AlertManagerConfig struct {
|
2015-02-16 20:11:00 +00:00
|
|
|
// Aggregation rule definitions.
|
|
|
|
AggregationRule []*AggregationRule `protobuf:"bytes,1,rep,name=aggregation_rule" json:"aggregation_rule,omitempty"`
|
|
|
|
// Notification configuration definitions.
|
2013-07-29 16:43:01 +00:00
|
|
|
NotificationConfig []*NotificationConfig `protobuf:"bytes,2,rep,name=notification_config" json:"notification_config,omitempty"`
|
2015-02-16 20:11:00 +00:00
|
|
|
// List of alert inhibition rules.
|
|
|
|
InhibitRule []*InhibitRule `protobuf:"bytes,3,rep,name=inhibit_rule" json:"inhibit_rule,omitempty"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
2013-07-26 01:04:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AlertManagerConfig) Reset() { *m = AlertManagerConfig{} }
|
|
|
|
func (m *AlertManagerConfig) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*AlertManagerConfig) ProtoMessage() {}
|
|
|
|
|
|
|
|
func (m *AlertManagerConfig) GetAggregationRule() []*AggregationRule {
|
|
|
|
if m != nil {
|
|
|
|
return m.AggregationRule
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2013-07-29 16:43:01 +00:00
|
|
|
func (m *AlertManagerConfig) GetNotificationConfig() []*NotificationConfig {
|
|
|
|
if m != nil {
|
|
|
|
return m.NotificationConfig
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2013-08-27 13:32:08 +00:00
|
|
|
func (m *AlertManagerConfig) GetInhibitRule() []*InhibitRule {
|
|
|
|
if m != nil {
|
|
|
|
return m.InhibitRule
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2013-07-26 01:04:53 +00:00
|
|
|
func init() {
|
2015-05-23 22:11:13 +00:00
|
|
|
proto.RegisterEnum("io.prometheus.alertmanager.HipChatConfig_MessageFormat", HipChatConfig_MessageFormat_name, HipChatConfig_MessageFormat_value)
|
2013-07-26 01:04:53 +00:00
|
|
|
}
|