mirror of
https://github.com/prometheus/alertmanager
synced 2024-12-25 15:42:18 +00:00
Add config timeinterval that allows intervals to be dumped back out on the status page of Alertmanager
Signed-off-by: Ben Ridley <benridley29@gmail.com>
This commit is contained in:
parent
cbfbf07188
commit
1d912faab6
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
/data/
|
||||
make_container.sh
|
||||
/alertmanager
|
||||
/amtool
|
||||
*.yml
|
||||
|
@ -25,7 +25,6 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/benridley/gotime"
|
||||
"github.com/pkg/errors"
|
||||
commoncfg "github.com/prometheus/common/config"
|
||||
"github.com/prometheus/common/model"
|
||||
@ -220,10 +219,19 @@ func resolveFilepaths(baseDir string, cfg *Config) {
|
||||
}
|
||||
}
|
||||
|
||||
// A MuteTimeInterval represents a named set of time intervals for which a route should be muted
|
||||
// A MuteTimeInterval represents a named set of time intervals for which a route should be muted.
|
||||
type MuteTimeInterval struct {
|
||||
Name string `yaml:"name" json:"name"`
|
||||
TimeIntervals []gotime.TimeInterval `yaml:"time_intervals"`
|
||||
Name string `yaml:"name" json:"name"`
|
||||
TimeIntervals []TimeInterval `yaml:"time_intervals"`
|
||||
}
|
||||
|
||||
// A TimeInterval describes intervals of time.
|
||||
type TimeInterval struct {
|
||||
Times []string `yaml:"times"`
|
||||
Weekdays []string `yaml:"weekdays"`
|
||||
DaysOfMonth []string `yaml:"days_of_month"`
|
||||
Months []string `yaml:"months"`
|
||||
Years []string `yaml:"years"`
|
||||
}
|
||||
|
||||
// Config is the top-level configuration for Alertmanager's config files.
|
||||
|
Loading…
Reference in New Issue
Block a user