monitoring

package
v0.0.0-...-e06cd52 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert string

type Module

type Module interface {
	GetDescription() string
	IsEnabled() bool
	Run() ([]*ModuleReport, error)
}

type ModuleReport

type ModuleReport struct {
	Name            string                 `json:"name"`
	Timestamp       common.Timestamp       `json:"timestamp"`
	ExecutedCommand string                 `json:"command executed,omitempty"`
	Alerts          []Alert                `json:"alerts"`
	Warnings        []Warning              `json:"warnings"`
	Message         string                 `json:"message,omitempty"`
	Measurements    map[string]interface{} `json:"measurements,omitempty"`
}

ModuleReport provides the results of Module run Do not use the struct directly, use NewReport() to initialize it

func NewReport

func NewReport(name string, t time.Time, cmd string) ModuleReport

func (*ModuleReport) AddAlert

func (r *ModuleReport) AddAlert(alert string)

func (*ModuleReport) AddWarning

func (r *ModuleReport) AddWarning(warn string)

type Warning

type Warning string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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