2013-07-26 01:04:53 +00:00
|
|
|
// Copyright 2013 Prometheus Team
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
2013-08-05 09:49:56 +00:00
|
|
|
package io.prometheus.alertmanager;
|
2013-07-26 01:04:53 +00:00
|
|
|
|
2013-07-29 16:43:01 +00:00
|
|
|
// Configuration for notification via PagerDuty.
|
|
|
|
message PagerDutyConfig {
|
|
|
|
// PagerDuty service key, see:
|
|
|
|
// http://developer.pagerduty.com/documentation/integration/events
|
|
|
|
optional string service_key = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Configuration for notification via mail.
|
|
|
|
message EmailConfig {
|
|
|
|
// Email address to notify.
|
|
|
|
optional string email = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Notification configuration definition.
|
|
|
|
message NotificationConfig {
|
|
|
|
// Name of this NotificationConfig. Referenced from AggregationRule.
|
|
|
|
optional string name = 1;
|
|
|
|
// Zero or more PagerDuty notification configurations.
|
|
|
|
repeated PagerDutyConfig pagerduty_config = 2;
|
|
|
|
// Zero or more email notification configurations.
|
|
|
|
repeated EmailConfig email_config = 3;
|
|
|
|
}
|
|
|
|
|
2013-07-26 01:04:53 +00:00
|
|
|
// A regex-based label filter used in aggregations.
|
|
|
|
message Filter {
|
|
|
|
// The regex matching the label name.
|
2013-07-26 11:02:51 +00:00
|
|
|
optional string name_re = 1;
|
2013-07-26 01:04:53 +00:00
|
|
|
// The regex matching the label value.
|
2013-07-26 11:02:51 +00:00
|
|
|
optional string value_re = 2;
|
2013-07-26 01:04:53 +00:00
|
|
|
}
|
|
|
|
|
2013-07-29 16:43:01 +00:00
|
|
|
// Grouping and notification setting definitions for alerts.
|
2013-07-26 01:04:53 +00:00
|
|
|
message AggregationRule {
|
2013-07-29 16:43:01 +00:00
|
|
|
// Filters that define which alerts are matched by this AggregationRule.
|
2013-07-26 01:04:53 +00:00
|
|
|
repeated Filter filter = 1;
|
2013-07-29 16:43:01 +00:00
|
|
|
// How many seconds to wait before resending a notification for a specific alert.
|
2013-07-26 11:02:51 +00:00
|
|
|
optional int32 repeat_rate_seconds = 2 [default = 7200];
|
2013-07-29 16:43:01 +00:00
|
|
|
// Notification configuration to use for this AggregationRule, referenced by
|
|
|
|
// their name.
|
2013-07-30 12:49:16 +00:00
|
|
|
optional string notification_config_name = 3;
|
2013-07-26 01:04:53 +00:00
|
|
|
}
|
|
|
|
|
2013-07-29 16:43:01 +00:00
|
|
|
// Global alert manager configuration.
|
2013-07-26 01:04:53 +00:00
|
|
|
message AlertManagerConfig {
|
2013-07-29 16:43:01 +00:00
|
|
|
// Aggregation rule definitions.
|
2013-07-26 01:04:53 +00:00
|
|
|
repeated AggregationRule aggregation_rule = 1;
|
2013-07-29 16:43:01 +00:00
|
|
|
// Notification configuration definitions.
|
|
|
|
repeated NotificationConfig notification_config = 2;
|
2013-07-26 01:04:53 +00:00
|
|
|
}
|