monitor

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Subcommand = &cli.Subcommand{
	Use:   "monitor",
	Short: "Icinga/Nagios health checks",

	SetupCobra: func(cmd *cobra.Command) {
		cmd.Args = cobra.ExactArgs(0)
	},

	SetupSubcommands: func() []*cli.Subcommand {
		return []*cli.Subcommand{aliveCmd, snapshotsCmd}
	},
}

Functions

This section is empty.

Types

type AgeRule added in v0.9.6

type AgeRule struct {
	*config.MonitorCreation
	// contains filtered or unexported fields
}

func AgeRulesFromConfig added in v0.9.6

func AgeRulesFromConfig(in []config.MonitorCreation) ([]*AgeRule, error)

func NewAgeRule added in v0.9.6

func NewAgeRule(m *config.MonitorCreation) (*AgeRule, error)

func (*AgeRule) Skip added in v0.9.6

func (self *AgeRule) Skip(path *zfs.DatasetPath) (bool, error)

type AliveCheck

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

func NewAliveCheck

func NewAliveCheck(c *status.Client) *AliveCheck

func (*AliveCheck) OutputAndExit

func (self *AliveCheck) OutputAndExit() error

func (*AliveCheck) WithThresholds

func (self *AliveCheck) WithThresholds(warn, crit time.Duration) *AliveCheck

type CountRule added in v0.9.6

type CountRule struct {
	*config.MonitorCount
	// contains filtered or unexported fields
}

func CountRulesFromConfig added in v0.9.6

func CountRulesFromConfig(in []config.MonitorCount) ([]*CountRule, error)

func NewCountRule added in v0.9.6

func NewCountRule(m *config.MonitorCount) (*CountRule, error)

func (*CountRule) Skip added in v0.9.6

func (self *CountRule) Skip(path *zfs.DatasetPath) (bool, error)

type SnapCheck

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

func NewSnapCheck

func NewSnapCheck(resp *monitoringplugin.Response) *SnapCheck

func (*SnapCheck) Reset

func (self *SnapCheck) Reset() *SnapCheck

func (*SnapCheck) Run

func (self *SnapCheck) Run(ctx context.Context, j *config.JobEnum) error

func (*SnapCheck) UpdateStatus

func (self *SnapCheck) UpdateStatus(jobConfig *config.JobEnum) error

func (*SnapCheck) WithCountThresholds

func (self *SnapCheck) WithCountThresholds(warn, crit uint) *SnapCheck

func (*SnapCheck) WithCounts

func (self *SnapCheck) WithCounts(v bool) *SnapCheck

func (*SnapCheck) WithMaxProcs

func (self *SnapCheck) WithMaxProcs(n int) *SnapCheck

func (*SnapCheck) WithOldest

func (self *SnapCheck) WithOldest(v bool) *SnapCheck

func (*SnapCheck) WithPrefix

func (self *SnapCheck) WithPrefix(s string) *SnapCheck

func (*SnapCheck) WithResponse

func (self *SnapCheck) WithResponse(resp *monitoringplugin.Response,
) *SnapCheck

func (*SnapCheck) WithThresholds

func (self *SnapCheck) WithThresholds(warn, crit time.Duration) *SnapCheck

Jump to

Keyboard shortcuts

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