moonshot

package
v0.0.0-...-8b8651a Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MOONSHOT is a HPE Hardware Device we scrape
	MOONSHOT = "Moonshot"
	// SWITCHA is the Moonshot Hardware Device we scrape
	SWITCHA = "SwitchA"
	// SWITCHB is the Moonshot Hardware Device we scrape
	SWITCHB = "SwitchB"
	// THERMAL represents the thermal metric endpoint
	THERMAL = "ThermalMetrics"
	// POWER represents the power metric endpoint
	POWER = "PowerMetrics"
	// SWITCH represents the Moonshot switch metric endpoint
	SWITCH = "SwitchMetrics"
	// OK is a string representation of the float 1.0 for device status
	OK = 1.0
	// BAD is a string representation of the float 0.0 for device status
	BAD = 0.0
)

Variables

This section is empty.

Functions

func NewDeviceMetrics

func NewDeviceMetrics() *map[string]*metrics

Types

type Exporter

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

Exporter collects chassis manager stats from the given URI and exports them using the prometheus metrics package.

func NewExporter

func NewExporter(ctx context.Context, target, uri, profile string) (*Exporter, error)

NewExporter returns an initialized Exporter for HPE Moonshot device.

func (*Exporter) Collect

func (e *Exporter) Collect(ch chan<- prometheus.Metric)

Collect fetches the stats from configured fishymetrics location and delivers them as Prometheus metrics. It implements prometheus.Collector.

func (*Exporter) Describe

func (e *Exporter) Describe(ch chan<- *prometheus.Desc)

Describe describes all the metrics ever exported by the fishymetrics exporter. It implements prometheus.Collector.

Jump to

Keyboard shortcuts

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