alerting

package
v2.0.0-b2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: GPL-3.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

View Source
const (
	DefaultEndsAtDurationForSeverityInfo     = time.Minute * 5
	DefaultEndsAtDurationForSeverityCritical = time.Minute * 60
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertFetcher

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

func NewAlertFetcher

func NewAlertFetcher(cfg *config.SmartNodeConfig) *AlertFetcher

func (*AlertFetcher) FetchAlerts

func (a *AlertFetcher) FetchAlerts() ([]*models.GettableAlert, error)

fetches the current alerts directly the alertmanager container/application's API. If alerting/metrics are disabled, this function returns an empty array.

type Alerter

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

func NewAlerter

func NewAlerter(cfg *config.SmartNodeConfig, l *log.Logger) *Alerter

func (*Alerter) AlertBeaconClientSyncComplete

func (a *Alerter) AlertBeaconClientSyncComplete()

func (*Alerter) AlertExecutionClientSyncComplete

func (a *Alerter) AlertExecutionClientSyncComplete()

func (*Alerter) AlertFeeRecipientChanged

func (a *Alerter) AlertFeeRecipientChanged(newFeeRecipient common.Address, succeeded bool)

Sends an alert when the node automatically changed a node's fee recipient or attempted to (success or failure). If alerting/metrics are disabled, this function does nothing.

func (*Alerter) AlertMinipoolBalanceDistributed

func (a *Alerter) AlertMinipoolBalanceDistributed(minipoolAddress common.Address, succeeded bool)

Sends an alert when the node automatically distributes a minipool's balance (success or failure). If alerting/metrics are disabled, this function does nothing.

func (*Alerter) AlertMinipoolBondReduced

func (a *Alerter) AlertMinipoolBondReduced(minipoolAddress common.Address, succeeded bool)

Sends an alert when the node automatically reduced a minipool's bond or attempted to (success or failure). If alerting/metrics are disabled, this function does nothing.

func (*Alerter) AlertMinipoolPromoted

func (a *Alerter) AlertMinipoolPromoted(minipoolAddress common.Address, succeeded bool)

Sends an alert when the node automatically prompted a minipool or attempted to (success or failure). If alerting/metrics are disabled, this function does nothing.

func (*Alerter) AlertMinipoolStaked

func (a *Alerter) AlertMinipoolStaked(minipoolAddress common.Address, succeeded bool)

Sends an alert when the node automatically staked a minipool or attempted to (success or failure). If alerting/metrics are disabled, this function does nothing.

type ClientKind

type ClientKind string
const (
	ClientKindExecution ClientKind = "Execution"
	ClientKindBeacon    ClientKind = "Beacon"
)

type Severity

type Severity string
const (
	SeverityInfo     Severity = "info"
	SeverityWarning  Severity = "warning"
	SeverityCritical Severity = "critical"
)

Directories

Path Synopsis
alertmanager

Jump to

Keyboard shortcuts

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