alertcomponent

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilObject              = errors.New("There is something wrong with the object in the resource pool")
	ErrIllegalAddress         = errors.New("The access address is illegal")
	ErrPrometheusApiResponse  = errors.New("Prometheus API request error")
	ErrPrometheusDependsEmpty = errors.New("Prometheus does not configure alertmanager")
	ErrCheckNotSupported      = errors.New("Detection is not supported")
)

Functions

This section is empty.

Types

type AlertManager

type AlertManager struct {
	// contains filtered or unexported fields
}

func NewAlertManager

func NewAlertManager(url string) (*AlertManager, error)

func (*AlertManager) CheckDependents

func (p *AlertManager) CheckDependents() error

CheckDependents ...

func (*AlertManager) Health

func (p *AlertManager) Health() error

Health 无法检测从 alertmanger 到 clickvisual 的网络状态

type Component

type Component interface {
	Health() error
	CheckDependents() error
}

type Prometheus

type Prometheus struct {
	// contains filtered or unexported fields
}

func NewPrometheus

func NewPrometheus(url string, ruleStoreType int) (*Prometheus, error)

func (*Prometheus) CheckDependents

func (p *Prometheus) CheckDependents() error

CheckDependents prometheus dependent components AlertManager

func (*Prometheus) Health

func (p *Prometheus) Health() error

func (*Prometheus) IsRuleTakeEffect

func (p *Prometheus) IsRuleTakeEffect(rules []string) (bool, error)

Jump to

Keyboard shortcuts

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