health

package
v0.37.2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Condition

type Condition interface {
	Probe() (StatusMessage, error)
}

Condition represents an aspect of pyroscope server health.

type Controller

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

Controller performs probes of health conditions.

func NewController

func NewController(logger *logrus.Logger, interval time.Duration, conditions ...Condition) *Controller

func (*Controller) IsOutOfDiskSpace added in v0.8.0

func (c *Controller) IsOutOfDiskSpace() bool

func (*Controller) NotificationText

func (c *Controller) NotificationText() string

NotificationText satisfies server.Notifier.

TODO(kolesnikovae): I think we need to make UI notifications

structured (explicit status field) and support multiple messages.
At the moment there can be only one notification.

func (*Controller) Start

func (c *Controller) Start()

func (*Controller) Stop

func (c *Controller) Stop()

func (*Controller) Unhealthy

func (c *Controller) Unhealthy() []StatusMessage

type DiskPressure

type DiskPressure struct {
	Threshold float64
	Path      string
}

func (DiskPressure) Probe

func (d DiskPressure) Probe() (StatusMessage, error)

type Status

type Status int
const (
	NoData Status = iota
	Healthy
	Warning
	Critical
)

func (Status) String

func (s Status) String() string

type StatusMessage

type StatusMessage struct {
	Status
	// The message is displayed to users.
	Message string
}

Jump to

Keyboard shortcuts

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