Add support for PagerDuty
This commit is contained in:
@ -46,7 +46,8 @@ type Service struct {
|
||||
// Alerts is the alerting configuration for the service in case of failure
|
||||
Alerts []*Alert `yaml:"alerts"`
|
||||
|
||||
NumberOfFailuresInARow int
|
||||
NumberOfFailuresInARow int
|
||||
NumberOfSuccessesInARow int
|
||||
}
|
||||
|
||||
func (service *Service) Validate() {
|
||||
@ -64,6 +65,9 @@ func (service *Service) Validate() {
|
||||
if alert.Threshold <= 0 {
|
||||
alert.Threshold = 3
|
||||
}
|
||||
if alert.SuccessBeforeResolved <= 0 {
|
||||
alert.SuccessBeforeResolved = 2
|
||||
}
|
||||
}
|
||||
if len(service.Url) == 0 {
|
||||
panic(ErrNoUrl)
|
||||
|
Reference in New Issue
Block a user