redfish

package
v1.27.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func GetInletTempForTypeDelliDRAC

func GetInletTempForTypeDelliDRAC(ctx context.Context, server string, client *http.Client, editorFns ...util.RequestEditorFn) (float64, error)

GetInletTempForTypeDelliDRAC returns inlet temp.

  • URL: https://{SERVER}/redfish/v1/Chassis/System.Embedded.1/Sensors/SystemBoardInletTemp
  • Key: ["Reading"]

func GetInletTempForTypeLenovoXClarity

func GetInletTempForTypeLenovoXClarity(ctx context.Context, server string, client *http.Client, editorFns ...util.RequestEditorFn) (float64, error)

GetInletTempForTypeLenovoXClarity returns inlet temp.

  • URL: https://{SERVER}/redfish/v1/Chassis/1/Sensors/{SENSOR_ID}
  • Key: ["Reading"]
  • SENSOR_ID: ["Name"] == "Ambient Temp" in range [ https://{SERVER}/redfish/v1/Chassis/1/Sensors "Members" ]

NOTE: sensor_id is currently fixed to "128L0" as all our servers have the same ID for the ambient temperature sensor. For more flexibility, search for a sensor with `Name: "Ambient Temp"` and cache its ID (servers typically have dozens of sensors, so caching is necessary for performance). This may require an additional variable (e.g., a sync.Map) in RedfishClient for data sharing.

func GetInletTempForTypeSupermicroSSM

func GetInletTempForTypeSupermicroSSM(ctx context.Context, server string, client *http.Client, editorFns ...util.RequestEditorFn) (float64, error)

GetInletTempForTypeSupermicroSSM returns inlet temp.

  • URL: https://{SERVER}/redfish/v1/Chassis/1/Thermal
  • Key: ["Name"] == "System Temp" in range ["Temperatures"] | ["ReadingCelsius"]

Types

type GetInletTempFunc

type GetInletTempFunc func(ctx context.Context, server string, client *http.Client, editorFns ...util.RequestEditorFn) (float64, error)

type InletTempAgent

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

func NewInletTempAgent

func NewInletTempAgent(address string, serverType ServerType, insecureSkipVerify bool, timeout time.Duration, editorFns ...util.RequestEditorFn) *InletTempAgent

NewInletTempAgent inits the client. If serverType is not specified, the client will try all known endpoints.

func (*InletTempAgent) Fetch

func (a *InletTempAgent) Fetch(ctx context.Context) (float64, error)

func (*InletTempAgent) ValueType

func (a *InletTempAgent) ValueType() metrics.ValueType

type ServerType

type ServerType string
const (
	TypeAutoDetect ServerType = ""

	TypeDelliDRAC      ServerType = "iDRAC"
	TypeLenovoXClarity ServerType = "XClarity"
	TypeSupermicroSSM  ServerType = "SSM"
)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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