Documentation ¶
Overview ¶
Package vmalert provides facilities for working with VMAlert.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExternalRules ¶
type ExternalRules struct {
// contains filtered or unexported fields
}
ExternalRules contains all logic related to alerting rules files.
func NewExternalRules ¶
func NewExternalRules() *ExternalRules
NewExternalRules creates new ExternalRules instance.
func (*ExternalRules) ReadRules ¶
func (s *ExternalRules) ReadRules() (string, error)
ReadRules reads current rules from FS.
func (*ExternalRules) RemoveRulesFile ¶
func (s *ExternalRules) RemoveRulesFile() error
RemoveRulesFile removes rules file from FS.
func (*ExternalRules) ValidateRules ¶
func (s *ExternalRules) ValidateRules(ctx context.Context, rules string) error
ValidateRules validates alerting rules.
func (*ExternalRules) WriteRules ¶
func (s *ExternalRules) WriteRules(rules string) error
WriteRules writes rules to file.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is responsible for interactions with victoria metrics.
func NewVMAlert ¶
func NewVMAlert(externalRules *ExternalRules, baseURL string) (*Service, error)
NewVMAlert creates new Victoria Metrics Alert service.
func (*Service) RequestConfigurationUpdate ¶
func (svc *Service) RequestConfigurationUpdate()
RequestConfigurationUpdate requests VMAlert configuration update.
Click to show internal directories.
Click to hide internal directories.