Documentation ¶
Overview ¶
Package checks provides security checks functionality.
Index ¶
- func GetAdditionalContext() map[string]starlark.GoFunc
- func GetFuncsForVersion(version uint32) (map[string]starlark.GoFunc, error)
- type Service
- func (s *Service) ChangeInterval(params map[string]check.Interval) error
- func (s *Service) CleanupAlerts()
- func (s *Service) Collect(ch chan<- prom.Metric)
- func (s *Service) Describe(ch chan<- *prom.Desc)
- func (s *Service) DisableChecks(checkNames []string) error
- func (s *Service) EnableChecks(checkNames []string) error
- func (s *Service) GetAllChecks() map[string]check.Check
- func (s *Service) GetDisabledChecks() ([]string, error)
- func (s *Service) GetSecurityCheckResults() ([]check.Result, error)
- func (s *Service) Run(ctx context.Context)
- func (s *Service) StartChecks(ctx context.Context, intervalGroup check.Interval, checkNames []string) error
- func (s *Service) UpdateIntervals(rare, standard, frequent time.Duration)
- type StarlarkScriptData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAdditionalContext ¶
GetAdditionalContext returns additional functions to be used in check scripts.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is responsible for interactions with Percona Check service.
func New ¶
func New(agentsRegistry agentsRegistry, alertmanagerService alertmanagerService, db *reform.DB) (*Service, error)
New returns Service with given PMM version.
func (*Service) ChangeInterval ¶
ChangeInterval changes a check's interval to the value received from the UI.
func (*Service) CleanupAlerts ¶
func (s *Service) CleanupAlerts()
CleanupAlerts drops all alerts in registry.
func (*Service) DisableChecks ¶
DisableChecks disables checks with provided names.
func (*Service) EnableChecks ¶
EnableChecks enables checks with provided names.
func (*Service) GetAllChecks ¶
GetAllChecks returns all available checks.
func (*Service) GetDisabledChecks ¶
GetDisabledChecks returns disabled checks.
func (*Service) GetSecurityCheckResults ¶
GetSecurityCheckResults returns the results of the STT checks that were run. It returns services.ErrSTTDisabled if STT is disabled.
func (*Service) StartChecks ¶
func (s *Service) StartChecks(ctx context.Context, intervalGroup check.Interval, checkNames []string) error
StartChecks triggers STT checks downloading and execution. If intervalGroup specified only checks from that group will be executed. If checkNames specified then only matched checks will be executed.
func (*Service) UpdateIntervals ¶
UpdateIntervals updates STT restart timers intervals.