checks

package
v2.11.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2020 License: AGPL-3.0 Imports: 29 Imported by: 0

Documentation

Overview

Package checks provides security checks functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFuncsForVersion

func GetFuncsForVersion(version uint32) (map[string]starlark.GoFunc, error)

GetFuncsForVersion returns predefined functions for specified check version.

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) Collect

func (s *Service) Collect(ch chan<- prom.Metric)

Collect implements prom.Collector.

func (*Service) Describe

func (s *Service) Describe(ch chan<- *prom.Desc)

Describe implements prom.Collector.

func (*Service) GetSecurityCheckResults

func (s *Service) GetSecurityCheckResults() ([]check.Result, error)

GetSecurityCheckResults returns the results of the STT checks that were run. It returns services.ErrSTTDisabled if STT is disabled.

func (*Service) Run

func (s *Service) Run(ctx context.Context)

Run runs main service loops.

func (*Service) StartChecks

func (s *Service) StartChecks(ctx context.Context) error

StartChecks triggers STT checks downloading and execution. It returns services.ErrSTTDisabled if STT is disabled.

type StarlarkScriptData

type StarlarkScriptData struct {
	Version     uint32 `json:"version"`
	Name        string `json:"name"`
	Script      string `json:"script"`
	QueryResult []byte `json:"query_result"`
}

StarlarkScriptData represents the data we need to pass to the binary to run starlark scripts.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL