omreport

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultOMReportExecutable the default path of the omreport binary
	DefaultOMReportExecutable = "/opt/dell/srvadmin/bin/omreport"
)

Variables

View Source
var (
	// ErrPath is returned by Command if the program is not in the PATH.
	ErrPath = errors.New("program not in PATH")
	// ErrTimeout is returned by Command if the program timed out.
	ErrTimeout = errors.New("program killed after timeout")
)

Functions

func Command

func Command(timeout time.Duration, stdin io.Reader, name string, arg ...string) (io.Reader, error)

Command exit within timeout, it is sent SIGINT (if supported by Go). After another timeout, it is killed.

func Replace

func Replace(s, replacement string) (string, error)

Replace certain chars in a string

Types

type OMReport

type OMReport struct {
	Options *Options
	Reader  func(func([]string), string, ...string)
}

OMReport contains the Options and a Reader to mock outputs during development

func New

func New(opts *Options) *OMReport

New returns a new *OMReport

func (*OMReport) Chassis

func (or *OMReport) Chassis() ([]Value, error)

Chassis returns the chassis status

func (*OMReport) ChassisBatteries added in v1.3.0

func (or *OMReport) ChassisBatteries() ([]Value, error)

ChassisBatteries retursn the chassis batteries status

func (*OMReport) Fans

func (or *OMReport) Fans() ([]Value, error)

Fans returns the fan status and if supported RPM reading

func (*OMReport) Memory

func (or *OMReport) Memory() ([]Value, error)

Memory returns the memory status

func (*OMReport) Nics added in v1.3.0

func (or *OMReport) Nics() ([]Value, error)

Nics returns the connection status of the NICs

func (*OMReport) Processors

func (or *OMReport) Processors() ([]Value, error)

Processors returns the processors status

func (*OMReport) Ps

func (or *OMReport) Ps() ([]Value, error)

Ps returns the power supply state and if supported input/output wattage

func (*OMReport) PsAmpsSysboardPwr

func (or *OMReport) PsAmpsSysboardPwr() ([]Value, error)

PsAmpsSysboardPwr returns the power supply system board amps power consumption

func (*OMReport) StorageBattery

func (or *OMReport) StorageBattery() ([]Value, error)

StorageBattery returns the storage battery ("RAID batteries")

func (*OMReport) StorageController

func (or *OMReport) StorageController() ([]Value, error)

StorageController returns the storage controller status

func (*OMReport) StorageEnclosure

func (or *OMReport) StorageEnclosure() ([]Value, error)

StorageEnclosure returns the storage enclosure status

func (*OMReport) StoragePdisk

func (or *OMReport) StoragePdisk(cid string) ([]Value, error)

StoragePdisk is called from the controller func, since it needs the encapsulating IDs.

func (*OMReport) StorageVdisk

func (or *OMReport) StorageVdisk() ([]Value, error)

StorageVdisk returns the storage vdisk status

func (*OMReport) System

func (or *OMReport) System() ([]Value, error)

System returns the system status

func (*OMReport) Temps

func (or *OMReport) Temps() ([]Value, error)

Temps returns the temperatures for the chassis including the min and max, for the max value, warning and failure thresholds are returned

func (*OMReport) Volts

func (or *OMReport) Volts() ([]Value, error)

Volts returns the chassis volts statud and if support reading

type Options

type Options struct {
	OMReportExecutable string
}

Options allow to set options for the OMReport package

type Value

type Value struct {
	Name   string
	Value  string
	Labels map[string]string
}

Value contains a metrics name, value and labels

Jump to

Keyboard shortcuts

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