pdu

package
v0.0.0-...-0e7caef Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const BachmannEnergy = ".1.3.6.1.4.1.31770.2.2.8.4.1.5.0.0.255.255.255.255.0.36"

BachmannEnergy represents the energy in kWh measured since the device was activated

View Source
const BachmannPower = ".1.3.6.1.4.1.31770.2.2.8.4.1.5.0.0.255.255.255.255.0.19"

BachmannPower represents the wattage of the first PDU on the inlet layer for a BlueNet2 PDU

View Source
const RittalAltEnergy = ".1.3.6.1.2.1.99.1.1.1.4.1004"

RittalManEnergy is an alternative OID to RittalEnergy for older devices.

View Source
const RittalAltPower = ".1.3.6.1.2.1.99.1.1.1.4.1003"

RittalManPower represents the "total" wattage for a Rittal PDU-MAN

View Source
const RittalEnergy = ".1.3.6.1.2.1.99.1.1.1.4.101004"

RittalControllerEnergy represents the energy in kWh measured since the device was activated

View Source
const RittalPower = ".1.3.6.1.2.1.99.1.1.1.4.101003"

RittalControllerPower represents the "total" wattage for a Rittal PDU-Controller

View Source
const RittalTypeOID = ".1.3.6.1.4.1.2606.7.4.1.2.1.2.1"

RittalTypeOID allows for a differentiation between the two types of Rital PDUs

The two options are "PDU-Controller" and "PDU-MAN"

Variables

This section is empty.

Functions

func GetBachmannMetrics

func GetBachmannMetrics(g *gosnmp.GoSNMP) (float64, float64, error)

func GetControllerMetrics

func GetControllerMetrics(g *gosnmp.GoSNMP) (float64, float64, error)

GetControllerMetrics returns the power and energy of a Rittal PDU-Controller

func GetManMetrics

func GetManMetrics(g *gosnmp.GoSNMP) (float64, float64, error)

GetManMetrics returns the power and energy of a Rittal PDU-MAN

func GetMetrics

func GetMetrics(g *gosnmp.GoSNMP) (float64, float64, error)

GetMetrics returns the power and energy using manufacturer/model specific methods

func GetRittalMetrics

func GetRittalMetrics(g *gosnmp.GoSNMP) (float64, float64, error)

func Handler

func Handler(g *gosnmp.GoSNMP, rack string)

Handler collects data on a PDU and registers power and energy metrics.

Types

type Manufacturer

type Manufacturer int
const (
	Bachmann Manufacturer = iota
	Rittal
)

Enumerates the types of PDU manufactuerers

func GetManufacturer

func GetManufacturer(g *gosnmp.GoSNMP) (Manufacturer, error)

GetManufacturer determines the manufactuerer of a PDU

type RittalType

type RittalType int
const (
	Man RittalType = iota
	Controller
)

Enumerates the types of PDU manufactuerers

func GetRittalType

func GetRittalType(g *gosnmp.GoSNMP) (RittalType, error)

GetRittalType determines the type of PDU we are dealing with:

PDU-Controller, used by most institutes, or PDU-MAN, an older variant.

Jump to

Keyboard shortcuts

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