types

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUS added in v1.0.4

type CPUS struct {
	TimeStat cpu.TimesStat `json:"timesStat"`
	Usage    float64       `json:"usage"`
}

type Check added in v1.0.7

type Check struct {
	Output        string
	InMemoryValue string
	ExitCode      int
}

Check displays a nagios compliant check as a struct

type Disks

type Disks struct {
	Usage   *disk.UsageStat    `json:"usage"`
	Details disk.PartitionStat `json:"details"`
}

type Icinga

type Icinga struct {
	ExitCode         int
	ExitWording      string
	PluginOutput     string
	LongPluginOutput string
	PerfData         string

	Warning  Threshold
	Critical Threshold
}

func NewIcinga

func NewIcinga(output, warning, critical string) *Icinga

func (*Icinga) AddPerfData

func (i *Icinga) AddPerfData(value float64, data string)

func (*Icinga) Evaluate

func (i *Icinga) Evaluate(value float64, label, longOutputOK, longOutputWarning, longOutputCritical string, verbose bool)

func (*Icinga) GenerateOutput

func (i *Icinga) GenerateOutput(perfData bool)

func (*Icinga) InlineEvaluate added in v1.0.4

func (i *Icinga) InlineEvaluate(value float64, label, outputOK, outputWarning, outputCritical string, verbose bool)

func (*Icinga) ParseToPerfData

func (i *Icinga) ParseToPerfData(data gjson.Result)

type Procs

type Procs struct {
	Name          string   `json:"name"`
	MemoryPercent float32  `json:"memoryPercent"`
	CPUPercent    float64  `json:"cpuPercent"`
	Exe           string   `json:"exe"`
	Status        []string `json:"status"`
}

type Threshold

type Threshold struct {
	Raw        string
	Up         float64
	UpString   string
	Down       float64
	DownString string
	Negate     bool
}

type TimeSync

type TimeSync struct {
	Timestamp int64  `json:"timestamp"`
	Formatted string `json:"formatted"`
}

type Version added in v1.0.4

type Version struct {
	Version string `json:"version"`
	Commit  string `json:"commit"`
	Date    string `json:"date"`
}

Jump to

Keyboard shortcuts

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