Documentation ¶
Index ¶
- Variables
- type ArrayAccelerator
- type AuthConfig
- type AuthProtocol
- type BatteryStatus
- type Controller
- type Fan
- type FanLocale
- type FanRedundancy
- type FanStatus
- type FaultTolerance
- type LogicalDrive
- type LogicalDriveStatus
- type MIB
- func (m *MIB) ASRStatus() (Status, error)
- func (m *MIB) ArrayAccelerators() ([]ArrayAccelerator, error)
- func (m *MIB) BackupBatteryStatus() (Status, error)
- func (m *MIB) Close() error
- func (m *MIB) Connect() error
- func (m *MIB) ControllerStatus() (Status, error)
- func (m *MIB) Controllers() ([]Controller, error)
- func (m *MIB) DriveArrayStatus() (Status, error)
- func (m *MIB) EnclosureStatus() (Status, error)
- func (m *MIB) FanStatus() (Status, error)
- func (m *MIB) Fans() ([]Fan, error)
- func (m *MIB) LogicalDrives() ([]LogicalDrive, error)
- func (m *MIB) MemoryModules() ([]MemoryModule, error)
- func (m *MIB) MemoryStatus() (Status, error)
- func (m *MIB) Model() (string, error)
- func (m *MIB) PhysicalDrives() ([]PhysicalDrive, error)
- func (m *MIB) PowerMeterReading() (int, error)
- func (m *MIB) PowerSupplies() ([]PowerSupply, error)
- func (m *MIB) PowerSupplyStatus() (Status, error)
- func (m *MIB) ProcessorStatus() (Status, error)
- func (m *MIB) Processors() ([]Processor, error)
- func (m *MIB) SerialNumber() (string, error)
- func (m *MIB) TemperatureSensorStatus() (Status, error)
- func (m *MIB) TemperatureSensors() ([]TemperatureSensor, error)
- type MIBConfig
- type MediaType
- type MemoryModule
- type MemoryModuleStatus
- type OID
- type OIDList
- type PhysicalDrive
- type PhysicalDriveStatus
- type PowerSupply
- type PowerSupplyStatus
- type PrivProtocol
- type Processor
- type ProcessorPowerStatus
- type ProcessorStatus
- type SMARTStatus
- type SNMPConfig
- type SNMPVersion
- type SecurityLevel
- type Status
- type StatusChecker
- type TemperatureSensor
- type TemperatureSensorLocale
- type TemperatureSensorThresholdType
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNoResultsReturned is the error returned when no results are returned when querying the MIB for a specific OID. ErrNoResultsReturned = errors.New("querying MIB returned no results") // ErrExpectedInteger is the error returned when the value at a specific OID was expected to be an integer but another // type was returned instead. ErrExpectedInteger = errors.New("expected value to be an integer") // ErrExpectedOctetString is the error returned when the value at a specific OID was expected to be an octet string but // another type was returned instead. ErrExpectedOctetString = errors.New("expected value to be a octet string") )
Functions ¶
This section is empty.
Types ¶
type ArrayAccelerator ¶
type ArrayAccelerator struct { ID int Status Status BatteryStatus BatteryStatus SerialNumber string FailedBatterySlots string }
ArrayAccelerator models an Array Accelerator in the HP MIB.
type AuthConfig ¶
type AuthConfig struct { // Community specifies the community name to use with the SNMP connection. Community string `yaml:"community"` // SecurityLevel specifies the security level to use for SNMPv3 connections. Supported security levels are "authPriv", "authNoPriv", and "noAuthNoPriv". SecurityLevel SecurityLevel `yaml:"security-level,omitempty"` // Username specifies the username use for SNMPv3 connections. Username string `yaml:"username,omitempty"` // Password specifies the password use for SNMPv3 connections. Password string `yaml:"password,omitempty"` // AuthProtocol specifies the auth protocol to use for SNMPv3 connections. Supported auth protocols are "SHA" and "MD5". AuthProtocol AuthProtocol `yaml:"auth-protocol,omitempty"` // PrivProtocol specifies the priv protocol to use for SNMPv3 connections. Supported priv protocols are "DES" and "AES". PrivProtocol PrivProtocol `yaml:"priv-protocol,omitempty"` // PrivPassword specifies the priv password to use for SNMPv3 connections. PrivPassword string `yaml:"priv-password,omitempty"` // ContextName specifies the context name to use for SNMPv3 connections. ContextName string `yaml:"context-name,omitempty"` }
AuthConfig is used to configure authentication and authorization for the SNMP connection.
type AuthProtocol ¶
type AuthProtocol string
AuthProtocol is the auth protocol to use for SNMPv3 connections.
const ( // AuthProtocolMD5 models the MD5 auth protocol for SNMPv3 connections. AuthProtocolMD5 AuthProtocol = "MD5" // AuthProtocolSHA models the SHA auth protocol for SNMPv3 connections. AuthProtocolSHA AuthProtocol = "SHA" )
Auth protocols for SNMPv3 connections.
type BatteryStatus ¶
type BatteryStatus int
BatteryStatus descibes the state of a battery.
const ( // BatteryStatusUnknown indicates that the battery status cannot be determined. BatteryStatusUnknown BatteryStatus = -1 // BatteryStatusOther indicates that the instrument agent does not recognize battery status. BatteryStatusOther BatteryStatus = 1 // BatteryStatusOK indicates that the battery is fully charged. BatteryStatusOK BatteryStatus = 2 // BatteryStatusCharging indicates that the battery power is less than 75% and is recharging. BatteryStatusCharging BatteryStatus = 3 // BatteryStatusFailed indicates that the battery has failed. BatteryStatusFailed BatteryStatus = 4 // BatteryStatusDegraded indicates that the battery is below the sufficient voltage level and has not been recharged. BatteryStatusDegraded BatteryStatus = 5 // BatteryStatusNotPresent indicates that there is no battery installed. BatteryStatusNotPresent BatteryStatus = 6 // BatteryStatusCapacitorFailed indicates that the battery capacitor failed. BatteryStatusCapacitorFailed BatteryStatus = 7 )
func (*BatteryStatus) String ¶
func (s *BatteryStatus) String() string
String converts the BatteryStatus to a human readable string.
type Controller ¶
Controller models a storage controller in the HP MIB.
type Fan ¶
type Fan struct { ID int Locale FanLocale Redundancy FanRedundancy Status Status }
Fan models a fan in the HP MIB.
type FanLocale ¶
type FanLocale int
FanLocale specifies the location of the fan in the system.
const ( FanLocaleOther FanLocale = 1 FanLocaleUnknown FanLocale = 2 FanLocaleSystem FanLocale = 3 FanLocaleSystemBoard FanLocale = 4 FanLocaleIOBoard FanLocale = 5 FanLocaleCPU FanLocale = 6 FanLocaleMemory FanLocale = 7 FanLocaleStorage FanLocale = 8 FanLocaleRemovableMedia FanLocale = 9 FanLocalePowerSupply FanLocale = 10 FanLocaleAmbient FanLocale = 11 FanLocaleChassis FanLocale = 12 FanLocaleBridgeCard FanLocale = 13 FanLocaleManagementBoard FanLocale = 14 FanLocaleBackplane FanLocale = 15 FanLocaleNetworkSlot FanLocale = 16 FanLocaleBladeSlot FanLocale = 17 FanLocaleVirtual FanLocale = 18 )
Locales for a fan defined by the HP MIB.
type FanRedundancy ¶
type FanRedundancy int
FanRedundancy describes the fault tolerance of the fan.
const ( FanRedundancyUnknown FanRedundancy = -11 FanRedundancyOther FanRedundancy = 1 FanRedundancyNotRedundant FanRedundancy = 2 FanRedundancyRedundant FanRedundancy = 3 )
Redundancy states for a fan defined by the HP MIB.
func (*FanRedundancy) String ¶
func (f *FanRedundancy) String() string
String converts the FanRedundancy to a human readable string.
type FaultTolerance ¶
type FaultTolerance int
FaultTolerance describes the fault tolerance of a logical drive.
const ( FaultToleranceUnknown FaultTolerance = -1 FaultToleranceOther FaultTolerance = 1 FaultToleranceNone FaultTolerance = 2 FaultToleranceMirroring FaultTolerance = 3 FaultToleranceDataGuard FaultTolerance = 4 FaultToleranceDistributedDataGuard FaultTolerance = 5 FaultToleranceAdvancedDataGuard FaultTolerance = 7 FaultToleranceRAID50 FaultTolerance = 8 FaultToleranceRAID10 FaultTolerance = 9 FaultToleranceRAID1ADM FaultTolerance = 10 FaultToleranceRAID10ADM FaultTolerance = 11 )
Fault tolerance modes for logical drives defined by the HP MIB.
func (*FaultTolerance) String ¶
func (f *FaultTolerance) String() string
String converts the FaultTolerance to a human readable string.
type LogicalDrive ¶
type LogicalDrive struct { // ID is the index of this logical drive. ID int // Name is this logical drive's name that is presented to the OS. Name string // AvailableSpares contains a list of physical drive IDs that that are available spares for this logical drive. AvailableSpares []string // ControllerID is the index of this logical drives' controller. ControllerID int // CapacityMB is the total capacity of this logical drive in megabytes. CapacityMB int // Condition represents the overall condition of this logical drive and any associated physical drives. Condition Status // Status represents the current status of this logical drive. Status LogicalDriveStatus // FaultTolerance is the fault tolerance mode of this logical drive. FaultTolerance FaultTolerance }
LogicalDrive models a logical drive in the HP MIB.
type LogicalDriveStatus ¶
type LogicalDriveStatus int
LogicalDriveStatus describes the state of a logical drive.
const ( LogicalDriveStatusOK LogicalDriveStatus = 2 LogicalDriveStatusFailed LogicalDriveStatus = 3 LogicalDriveStatusUnconfigured LogicalDriveStatus = 4 LogicalDriveStatusRecovering LogicalDriveStatus = 5 LogicalDriveStatusReadyForRebuild LogicalDriveStatus = 6 LogicalDriveStatusRebuilding LogicalDriveStatus = 7 LogicalDriveStatusWrongDrive LogicalDriveStatus = 8 LogicalDriveStatusBadConnect LogicalDriveStatus = 9 LogicalDriveStatusOverheating LogicalDriveStatus = 10 LogicalDriveStatusShutdown LogicalDriveStatus = 11 LogicalDriveStatusExpanding LogicalDriveStatus = 12 LogicalDriveStatusNotAvailable LogicalDriveStatus = 13 LogicalDriveStatusQueuedForExpansion LogicalDriveStatus = 14 LogicalDriveStatusMultipathAccessDegraded LogicalDriveStatus = 15 LogicalDriveStatusErasing LogicalDriveStatus = 16 LogicalDriveStatusUnknown LogicalDriveStatus = -1 )
Statuses for logical drives defined by the HP MIB.
func (*LogicalDriveStatus) String ¶
func (l *LogicalDriveStatus) String() string
String converts the LogicalDriveStatus to a human readable string.
type MIB ¶
type MIB struct {
// contains filtered or unexported fields
}
MIB implements StatusChecker.
func (*MIB) ASRStatus ¶
ASRStatus returns the status of the advanced server recovery sub-system. Returns a non-nil error if the status could not be determined.
func (*MIB) ArrayAccelerators ¶
func (m *MIB) ArrayAccelerators() ([]ArrayAccelerator, error)
ArrayAccelerators returns a list of Array Accelerators. Returns a non-nil error of the list of ArrayAccelerators could not be determined.
func (*MIB) BackupBatteryStatus ¶
BackupBatteryStatus returns the status of the battery backup sub-system. Returns a non-nil error if the status could not be determined.
func (*MIB) ControllerStatus ¶
ControllerStatus returns the overall status of the storage controllers. Returns a non-nil error if the status could not be determined.
func (*MIB) Controllers ¶
func (m *MIB) Controllers() ([]Controller, error)
Controllers returns a list of Controllers. Returns a non-nil error of the list of Controllers could not be determined.
func (*MIB) DriveArrayStatus ¶
DriveArrayStatus returns the overall status of the drive arrays. Returns a non-nil error if the status could not be determined.
func (*MIB) EnclosureStatus ¶
EnclosureStatus returns the overall status of the physical enclosure.
func (*MIB) FanStatus ¶
FanStatus returns the status of the fan(s) in the system. Returns StatusOther if fan status detection is not supported by the system, StatusOK if all fans are operating properly, StatusDegraded if a non-required fan is not operating properly, or StatusFailed if a required fan is not operating properly. Returns a non-nil error if the status could not be determined.
func (*MIB) Fans ¶
Fans returns a list of Fans. Returns a non-nil error of the list of Fans could not be determined.
func (*MIB) LogicalDrives ¶
func (m *MIB) LogicalDrives() ([]LogicalDrive, error)
LogicalDrives returns a list of Logical Drives. Returns a non-nil error if the list of Logical Drives could not be determined.
func (*MIB) MemoryModules ¶
func (m *MIB) MemoryModules() ([]MemoryModule, error)
MemoryModules returns a list of Memory Modules. Returns a non-nil error if the list of Memory Modules could not be determined.
func (*MIB) MemoryStatus ¶
MemoryStatus returns the status of the advanced memory protection sub-system. Returns a non-nil error if the status could not be determined.
func (*MIB) Model ¶
Model returns the model of the server. Returns a non-nil error if the model could not be determined.
func (*MIB) PhysicalDrives ¶
func (m *MIB) PhysicalDrives() ([]PhysicalDrive, error)
PhysicalDrives returns a list of Physical Drives. Returns a non-nil error of the list of Physical Drives could not be determined.
func (*MIB) PowerMeterReading ¶
PowerMeterReading returns the current power meter reading in Watts. Returns -1 if power meter is not supported by the server or an error if the power meter reading could not be determined.
func (*MIB) PowerSupplies ¶
func (m *MIB) PowerSupplies() ([]PowerSupply, error)
PowerSupplies returns a list of Power Supplies. Returns a non-nil error if the list of Power Supplies could not be determined.
func (*MIB) PowerSupplyStatus ¶
PowerSupplyStatus returns the status of the fault tolerant power supply sub-system. Returns StatusOther if power supply status detection is not supported by the system, StatusOK if all power supplies are operating properly, StatusDegraded if one or more power supplies are operating in a degraded state, or StatusFailed if one or more power supplies have failed. Returns a non-nil error if the status could not be determined.
func (*MIB) ProcessorStatus ¶
ProcessorStatus returns the status of the processor sub-system. Returns a non-nil error if the status could not be determined.
func (*MIB) Processors ¶
Processors returns a list of Processors. Returns a non-nil error if the list of Processors could not be determined.
func (*MIB) SerialNumber ¶
SerialNumber returns the serial number of the server. Returns a non-nil error if the serial number could not be determined.
func (*MIB) TemperatureSensorStatus ¶
TemperatureSensorStatus returns the status of the system's temperature sensors. Returns StatusOther if temperature sensor status detection is not supported by the system, StatusOK if all temperature sensors are within normal operating range, StatusDegraded if one or more temperature sensors are outside a normal operating range, or StatusFailed if one or more temperature sensors detect a condition that could permanently damage the system. Returns a non-nil error if the status could not be determined.
func (*MIB) TemperatureSensors ¶
func (m *MIB) TemperatureSensors() ([]TemperatureSensor, error)
TemperatureSensors returns a list of Temperature Sensors. Returns a non-nil error if the list of Temperature Sensors could not be determined.
type MIBConfig ¶
type MIBConfig struct {
SNMPConfig `yaml:"snmp"`
}
MIBConfig is used to configure the HP MIB.
type MediaType ¶
type MediaType int
MediaType describes a physical drive's media type in the HP MIB.
type MemoryModule ¶
type MemoryModule struct { CPUNumber int ModuleNumber int SizeKB int PartNo string Status MemoryModuleStatus }
MemoryModule models a Memory Module in the HP MIB.
type MemoryModuleStatus ¶
type MemoryModuleStatus int
MemoryModuleStatus describes the state of the Memory Module.
const ( MemoryModuleStatusUnknown MemoryModuleStatus = -1 MemoryModuleStatusOther MemoryModuleStatus = 1 MemoryModuleStatusNotPresent MemoryModuleStatus = 2 MemoryModuleStatusPresent MemoryModuleStatus = 3 MemoryModuleStatusGood MemoryModuleStatus = 4 MemoryModuleStatusAdd MemoryModuleStatus = 5 MemoryModuleStatusUpgrade MemoryModuleStatus = 6 MemoryModuleStatusMissing MemoryModuleStatus = 7 MemoryModuleStatusDoesNotMatch MemoryModuleStatus = 8 MemoryModuleStatusNotSupported MemoryModuleStatus = 9 MemoryModuleStatusBadConfig MemoryModuleStatus = 10 MemoryModuleStatusDegraded MemoryModuleStatus = 11 MemoryModuleStatusSpare MemoryModuleStatus = 12 MemoryModuleStatusPartial MemoryModuleStatus = 13 )
Statuses for a Memory Module defined by the HP MIB.
func (*MemoryModuleStatus) String ¶
func (m *MemoryModuleStatus) String() string
String converts MemoryModuleStatus to a human readable string.
type PhysicalDrive ¶
type PhysicalDrive struct { ID int ControllerID int CapacityMB int MediaType MediaType Location string Model string SerialNo string SMARTStatus SMARTStatus Status PhysicalDriveStatus }
PhysicalDrive models a physical drive in the HP MIB.
type PhysicalDriveStatus ¶
type PhysicalDriveStatus int
PhysicalDriveStatus describes the state of a physical drive.
const ( PhysicalDriveStatusUnknown PhysicalDriveStatus = -1 PhysicalDriveStatusOther PhysicalDriveStatus = 1 PhysicalDriveStatusOK PhysicalDriveStatus = 2 PhysicalDriveStatusFailed PhysicalDriveStatus = 3 PhysicalDriveStatusPredictiveFailure PhysicalDriveStatus = 4 PhysicalDriveStatusErasing PhysicalDriveStatus = 5 PhysicalDriveStatusEraseDone PhysicalDriveStatus = 6 PhysicalDriveStatusEraseQueued PhysicalDriveStatus = 7 PhysicalDriveStatusSSDWearOut PhysicalDriveStatus = 8 PhysicalDriveStatusNotAuthenticated PhysicalDriveStatus = 9 )
Statuses for physical drives defined by the HP MIB.
func (*PhysicalDriveStatus) String ¶
func (p *PhysicalDriveStatus) String() string
String converts the PhysicalDriveStatus to a human readable string.
type PowerSupply ¶
type PowerSupply struct { BayNo int ChassisNo int Condition Status Status PowerSupplyStatus SerialNo string Model string PowerRatingWatts int PowerConsumptionWatts int }
PowerSupply models a power supply in the HP MIB.
type PowerSupplyStatus ¶
type PowerSupplyStatus int
PowerSupplyStatus describes the status of a PowerSupply.
const ( PowerSupplyStatusUnknown PowerSupplyStatus = -1 PowerSupplyStatusNoError PowerSupplyStatus = 1 PowerSupplyStatusGeneralFailure PowerSupplyStatus = 2 PowerSupplyStatusBISTFailure PowerSupplyStatus = 3 PowerSupplyStatusFanFailure PowerSupplyStatus = 4 PowerSupplyStatusTempFailure PowerSupplyStatus = 5 PowerSupplyStatusInterlockOpen PowerSupplyStatus = 6 PowerSupplyStatusEPROMFailed PowerSupplyStatus = 7 PowerSupplyStatusVREFFailed PowerSupplyStatus = 8 PowerSupplyStatusDACFailed PowerSupplyStatus = 9 PowerSupplyStatusRAMTestFailed PowerSupplyStatus = 10 PowerSupplyStatusVoltageChannelFailed PowerSupplyStatus = 11 PowerSupplyStatusORRingDiodeFailed PowerSupplyStatus = 12 PowerSupplyStatusBrownOut PowerSupplyStatus = 13 PowerSupplyStatusGiveUpOnStartup PowerSupplyStatus = 14 PowerSupplyStatusNVRAMInvalid PowerSupplyStatus = 15 PowerSupplyStatusCalibrationTableInvalid PowerSupplyStatus = 16 PowerSupplyStatusNoPowerInput PowerSupplyStatus = 17 )
Statuses for power supplies defined by the HP MIB.
func (*PowerSupplyStatus) String ¶
func (ps *PowerSupplyStatus) String() string
String converts the PowerSupplyStatus to a human readable string.
type PrivProtocol ¶
type PrivProtocol string
PrivProtocol is the priv protocol to use for SNMPv3 connections.
const ( // PrivProtocolAES models the AES priv protocol for SNMPv3 connections. PrivProtocolAES PrivProtocol = "AES" // PrivProtocolDES models the DES priv protocol for SNMPv3 connections. PrivProtocolDES PrivProtocol = "DES" )
Priv protocols for SNMPv3 connections.
type Processor ¶
type Processor struct { ID int Name string MaxClockSpeedHz int CurrentClockSpeedHz int PhysicalCores int VirtualCores int Status ProcessorStatus PowerStatus ProcessorPowerStatus }
Processor models a CPU in the HP MIB.
type ProcessorPowerStatus ¶
type ProcessorPowerStatus int
ProcessorPowerStatus describes the power status of the Processor.
const ( ProcessorPowerStatusUnknown ProcessorPowerStatus = 1 ProcessorPowerStatusLowPowered ProcessorPowerStatus = 2 ProcessorPowerStatusNormalPowered ProcessorPowerStatus = 3 ProcessorPowerStatusHighPowered ProcessorPowerStatus = 4 )
Power statuses for a processor defined by the HP MIB.
func (*ProcessorPowerStatus) String ¶
func (p *ProcessorPowerStatus) String() string
String converts ProcessorPowerStatus to a human readable string.
type ProcessorStatus ¶
type ProcessorStatus int
ProcessorStatus describes the status of the Processor.
const ( ProcessorStatusUnknown ProcessorStatus = 1 ProcessorStatusOK ProcessorStatus = 2 ProcessorStatusDegraded ProcessorStatus = 3 ProcessorStatusFailed ProcessorStatus = 4 ProcessorStatusDisabled ProcessorStatus = 5 )
Statuses for a processor defined by the HP MIB.
func (*ProcessorStatus) String ¶
func (p *ProcessorStatus) String() string
String converts ProcessorStatus to a human readable string.
type SMARTStatus ¶
type SMARTStatus int
SMARTStatus describes the state of a physical disk using S.M.A.R.T. semantics.
const ( SMARTStatusUnknown SMARTStatus = -1 SMARTStatusOther SMARTStatus = 1 SMARTStatusOK SMARTStatus = 2 SMARTStatusReplaceDrive SMARTStatus = 3 )
S.M.A.R.T. statuses for physical drives defined by the HP MIB.
func (*SMARTStatus) String ¶
func (s *SMARTStatus) String() string
String converts the SMARTStatus to a human readable string.
type SNMPConfig ¶
type SNMPConfig struct { // Auth contains parameters used for authentication and authorization. Auth AuthConfig `yaml:"auth"` // Address specifies the address of the SNMP agent. Address string `yaml:"address"` // Port specifies the port that the SNMP agent is listening on. Port int `yaml:"port"` // Version specifies the SNMP protocol version to use. Supported versions are "1", "2c", and "3". Version SNMPVersion `yaml:"version"` }
SNMPConfig is used to configure the connection to the SNMP agent.
type SNMPVersion ¶
type SNMPVersion string
SNMPVersion is the protocol version to use for SNMP connections.
const ( // SNMPVersion3 models version 3 of of the SNMP protocol. SNMPVersion3 SNMPVersion = "3" // SNMPVersion2c models version 2c of of the SNMP protocol. SNMPVersion2c SNMPVersion = "2c" // SNMPVersion1 models version 1 of of the SNMP protocol. SNMPVersion1 SNMPVersion = "1" )
Versions of SNMP.
type SecurityLevel ¶
type SecurityLevel string
SecurityLevel is the security level to use for SNMPv3 connections.
const ( // SecurityLevelAuthPriv models the authPriv security level for SNMPv3 connections. SecurityLevelAuthPriv SecurityLevel = "authPriv" // SecurityLevelAuthNoPriv models the authNoPriv security level for SNMPv3 connections. SecurityLevelAuthNoPriv SecurityLevel = "authNoPriv" // SecurityLevelNoAuthNoPriv models the noAuthNoPriv securitylevel for SNMPv3 connections. SecurityLevelNoAuthNoPriv SecurityLevel = "noAuthNoPriv" )
Security levels for SNMPv3 connections.
type Status ¶
type Status int
Status describes the state of a device.
const ( // StatusUnknown is used if the status cannot be determined. StatusUnknown Status = -1 // StatusOther represents the "Other" state defined by the HP MIB. StatusOther Status = 1 // StatusOK represents the "OK" state defined by the HP MIB. StatusOK Status = 2 // StatusDegraded represents the "Degraded" state defined by the HP MIB. StatusDegraded Status = 3 // StatusFailed represents the "Failed" state defined by the HP MIB. StatusFailed Status = 4 )
Statuses defined by the HP MIB.
type StatusChecker ¶
type StatusChecker interface { ArrayAccelerators() ([]ArrayAccelerator, error) ASRStatus() (Status, error) BackupBatteryStatus() (Status, error) Controllers() ([]Controller, error) ControllerStatus() (Status, error) DriveArrayStatus() (Status, error) EnclosureStatus() (Status, error) Fans() ([]Fan, error) FanStatus() (Status, error) LogicalDrives() ([]LogicalDrive, error) MemoryModules() ([]MemoryModule, error) MemoryStatus() (Status, error) Model() (string, error) PhysicalDrives() ([]PhysicalDrive, error) PowerMeterReading() (int, error) PowerSupplies() ([]PowerSupply, error) PowerSupplyStatus() (Status, error) Processors() ([]Processor, error) ProcessorStatus() (Status, error) SerialNumber() (string, error) TemperatureSensors() ([]TemperatureSensor, error) TemperatureSensorStatus() (Status, error) }
A StatusChecker queries the HP MIB for device status information.
type TemperatureSensor ¶
type TemperatureSensor struct { ID int CurrentReadingCelsius int Locale TemperatureSensorLocale Status Status Threshold int ThresholdType TemperatureSensorThresholdType }
TemperatureSensor models a temperature sensor in the HP MIB.
type TemperatureSensorLocale ¶
type TemperatureSensorLocale int
TemperatureSensorLocale specifies the location of the temperature sensor.
const ( TemperatureSensorLocaleOther TemperatureSensorLocale = 1 TemperatureSensorLocaleUnknown TemperatureSensorLocale = 2 TemperatureSensorLocaleSystem TemperatureSensorLocale = 3 TemperatureSensorLocaleSystemBoard TemperatureSensorLocale = 4 TemperatureSensorLocaleIOBoard TemperatureSensorLocale = 5 TemperatureSensorLocaleCPU TemperatureSensorLocale = 6 TemperatureSensorLocaleMemory TemperatureSensorLocale = 7 TemperatureSensorLocaleStorage TemperatureSensorLocale = 8 TemperatureSensorLocaleRemovableMedia TemperatureSensorLocale = 9 TemperatureSensorLocalePowerSupply TemperatureSensorLocale = 10 TemperatureSensorLocaleAmbient TemperatureSensorLocale = 11 TemperatureSensorLocaleChassis TemperatureSensorLocale = 12 TemperatureSensorLocaleBridgeCard TemperatureSensorLocale = 13 )
Locales for a temperature sensor defined by the HP MIB.
func (*TemperatureSensorLocale) String ¶
func (t *TemperatureSensorLocale) String() string
String converts the TemperatureSensorLocale to a human readable string.
type TemperatureSensorThresholdType ¶
type TemperatureSensorThresholdType int
TemperatureSensorThresholdType describes the type of threshold associated with the temperature sensor.
const ( TemperatureSensorThresholdTypeUnknown TemperatureSensorThresholdType = -1 TemperatureSensorThresholdTypeOther TemperatureSensorThresholdType = 1 TemperatureSensorThresholdTypeBlowout TemperatureSensorThresholdType = 5 TemperatureSensorThresholdTypeCaution TemperatureSensorThresholdType = 9 TemperatureSensorThresholdTypeCritical TemperatureSensorThresholdType = 15 TemperatureSensorThresholdTypeNoReaction TemperatureSensorThresholdType = 16 )
Threshold types for a temperature sensor defined by the HP MIB.
func (*TemperatureSensorThresholdType) String ¶
func (t *TemperatureSensorThresholdType) String() string
String converts the TemperatureSensorThresholdType to a human readable string.