Documentation ¶
Index ¶
- Variables
- func GetInletTempForTypeDelliDRAC(ctx context.Context, server string, client *http.Client, ...) (float64, error)
- func GetInletTempForTypeLenovoXClarity(ctx context.Context, server string, client *http.Client, ...) (float64, error)
- func GetInletTempForTypeSupermicroSSM(ctx context.Context, server string, client *http.Client, ...) (float64, error)
- type GetInletTempFunc
- type InletTempAgent
- type ServerType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GetInletTempFns = map[ServerType]GetInletTempFunc{ TypeDelliDRAC: GetInletTempForTypeDelliDRAC, TypeLenovoXClarity: GetInletTempForTypeLenovoXClarity, TypeSupermicroSSM: GetInletTempForTypeSupermicroSSM, } )
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 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) ValueType ¶
func (a *InletTempAgent) ValueType() metrics.ValueType
type ServerType ¶
type ServerType string
const ( TypeAutoDetect ServerType = "" TypeDelliDRAC ServerType = "iDRAC" TypeLenovoXClarity ServerType = "XClarity" TypeSupermicroSSM ServerType = "SSM" )
Click to show internal directories.
Click to hide internal directories.