mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-23 00:46:23 +01:00
2a3a62dc41
vmalert: support configuration file for notifiers * vmalert notifiers now can be configured via file see https://docs.victoriametrics.com/vmalert.html#notifier-configuration-file * add support of Consul service discovery for notifiers config see https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1947 * add UI section for currently loaded/discovered notifiers * deprecate `-rule.configCheckInterval` in favour of `-configCheckInterval` * add ability to suppress logs for duplicated targets for notifiers discovery * change behaviour of `vmalert_alerts_send_errors_total` - it now accounts for failed alerts, not HTTP calls.
16 lines
428 B
Go
16 lines
428 B
Go
package notifier
|
|
|
|
import "context"
|
|
|
|
// Notifier is a common interface for alert manager provider
|
|
type Notifier interface {
|
|
// Send sends the given list of alerts.
|
|
// Returns an error if fails to send the alerts.
|
|
// Must unblock if the given ctx is cancelled.
|
|
Send(ctx context.Context, alerts []Alert) error
|
|
// Addr returns address where alerts are sent.
|
|
Addr() string
|
|
// Close is a destructor for the Notifier
|
|
Close()
|
|
}
|