monitor

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WatchGroup added in v0.6.0

func WatchGroup(mc MonitoringContext)

Types

type BaseContext added in v0.5.1

type BaseContext struct {
	Ctx         context.Context
	Logger      *zap.SugaredLogger
	NotifierMap map[string]notifications.Notifier
	Group       config.GroupConfig
	Site        string
	Tags        []string
}

type CheckContext

type CheckContext struct {
	Error       error
	Logger      *zap.SugaredLogger
	Site        string
	Group       string
	Host        string
	CheckConfig config.CheckConfig
	Tags        []string
	Elapsed     time.Duration
	Success     bool
}

type GroupStats

type GroupStats struct {
	AnyDown          bool
	AllDown          bool
	SuccessfulChecks int
	TotalHosts       int
	AvgResponseTime  time.Duration
}

type HostResult

type HostResult struct {
	Error        error
	ResponseTime time.Duration
	Success      bool
}

type MonitoringContext

type MonitoringContext struct {
	Base    BaseContext
	Metrics *metrics.PrometheusMetrics
	Check   config.CheckConfig
	Rules   []rules.Rule
}

Jump to

Keyboard shortcuts

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