mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-24 17:04:42 +01:00
Continue working on #2: Slack alerts
This commit is contained in:
parent
857fe5eb8c
commit
6596d253aa
@ -22,6 +22,7 @@ var (
|
||||
|
||||
type Config struct {
|
||||
Metrics bool `yaml:"metrics"`
|
||||
Alerting *core.Alerting `yaml:"alerting"`
|
||||
Services []*core.Service `yaml:"services"`
|
||||
}
|
||||
|
||||
|
14
core/alert.go
Normal file
14
core/alert.go
Normal file
@ -0,0 +1,14 @@
|
||||
package core
|
||||
|
||||
type Alert struct {
|
||||
Type AlertType `yaml:"type"`
|
||||
Enabled bool `yaml:"enabled"`
|
||||
Threshold int `yaml:"threshold"`
|
||||
Description string `yaml:"description"`
|
||||
}
|
||||
|
||||
type AlertType string
|
||||
|
||||
const (
|
||||
SlackAlert AlertType = "slack"
|
||||
)
|
5
core/alerting.go
Normal file
5
core/alerting.go
Normal file
@ -0,0 +1,5 @@
|
||||
package core
|
||||
|
||||
type Alerting struct {
|
||||
Slack string `yaml:"slack"`
|
||||
}
|
Loading…
Reference in New Issue
Block a user