mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Add database table for persisting alerting configuration (#32042)
* Alerting: Add database table for persisting alerting configuration * Fix the linter * Address review comments * Don't split templates and configuration It is already bundled together as part of a of the API so might as well marshall it directly.
This commit is contained in:
20
pkg/services/ngalert/models/alertmanager.go
Normal file
20
pkg/services/ngalert/models/alertmanager.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
// AlertConfiguration represents a single version of the Alerting Engine Configuration.
|
||||
type AlertConfiguration struct {
|
||||
ID int64 `xorm:"pk autoincr 'id'"`
|
||||
|
||||
AlertmanagerConfiguration string
|
||||
ConfigurationVersion string
|
||||
CreatedAt time.Time `xorm:"created"`
|
||||
UpdatedAt time.Time `xorm:"updated"`
|
||||
}
|
||||
|
||||
// GetLatestAlertmanagerConfigurationQuery is the query to get the latest alertmanager configuration.
|
||||
type GetLatestAlertmanagerConfigurationQuery struct {
|
||||
ID int64
|
||||
|
||||
Result *AlertConfiguration
|
||||
}
|
||||
Reference in New Issue
Block a user