Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertState ¶ added in v0.2.8
type AlertState int
const ( StateInactive AlertState = iota StatePending StateFiring )
func (AlertState) String ¶ added in v0.2.9
func (s AlertState) String() string
type AlertingRule ¶ added in v0.2.8
type AlertingRule struct { Rule model.Rule `json:"rule,omitempty"` Active map[uint64]*Alert `json:"active,omitempty"` }
func (AlertingRule) State ¶ added in v0.2.10
func (r AlertingRule) State() AlertState
type AlertingRuleGroup ¶ added in v0.2.15
type AlertingRuleGroup struct { DatasourceSelector model.DatasourceSelector `json:"datasourceSelector,omitempty"` GroupLabels map[string]string `json:"groupLabels,omitempty"` AlertingRules []AlertingRule `json:"alertingRules,omitempty"` }
type AlertingService ¶
type AlertingService struct {
// contains filtered or unexported fields
}
func New ¶
func New(cfg *model.Config, alertRuleFiles []model.RuleFile, datasourceService datasourceservice.IDatasourceService, remoteService *remote.RemoteService) *AlertingService
func (*AlertingService) DoAlert ¶ added in v0.2.8
func (s *AlertingService) DoAlert() error
func (*AlertingService) GetAlertingRuleGroups ¶ added in v0.2.18
func (s *AlertingService) GetAlertingRuleGroups() []AlertingRuleGroup
func (*AlertingService) GetAlertmanagerDiscovery ¶ added in v0.2.18
func (s *AlertingService) GetAlertmanagerDiscovery() promWebAPI.AlertmanagerDiscovery
func (*AlertingService) SendTestAlert ¶ added in v0.2.4
func (s *AlertingService) SendTestAlert() error
type IAlertingService ¶ added in v0.2.8
type IAlertingService interface {
DoAlert() error
}
Click to show internal directories.
Click to hide internal directories.