hmcollector

package
v0.0.0-...-a88ec0b Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEndpointList

func GetEndpointList(httpClient *hms_certs.HTTPClientPair, gatewayUrl string) ([]rf.RedfishEPDescription, error)

Types

type BranchCollection

type BranchCollection struct {
	Branch []ResourceID `json:"Branch"`
}

type Chassis

type Chassis struct {
	Model string
}

type Circuit

type Circuit struct {
	Id                   string                  `json:"Id"`
	Name                 string                  `json:"Name"`
	CurrentAmps          HPEPDUSensor            `json:"CurrentAmps"`
	EnergykWh            HPEPDUSensor            `json:"EnergykWh"`
	PolyPhasePowerWatts  map[string]HPEPDUSensor `json:"PolyPhasePowerWatts"`
	PolyPhaseVoltage     map[string]HPEPDUSensor `json:"PolyPhaseVoltage"`
	PolyPhaseCurrentAmps map[string]HPEPDUSensor `json:"PolyPhaseCurrentAmps"`
}

type CrayJSONPayload

type CrayJSONPayload struct {
	Timestamp             string
	Location              string
	ParentalContext       string `json:",omitempty"`
	ParentalIndex         *uint8 `json:",omitempty"`
	PhysicalContext       string
	Index                 *uint8 `json:",omitempty"`
	PhysicalSubContext    string `json:",omitempty"`
	DeviceSpecificContext string `json:",omitempty"`
	SubIndex              *uint8 `json:",omitempty"`
	Value                 string
}

type EnclosureThermal

type EnclosureThermal struct {
	Temperatures []Temperature
	Fans         []Fan
}

type Event

type Event struct {
	EventType         string      `json:",omitempty"`
	EventId           string      `json:",omitempty"`
	EventTimestamp    string      `json:",omitempty"`
	Severity          string      `json:",omitempty"`
	Message           string      `json:",omitempty"`
	MessageId         string      `json:",omitempty"`
	MessageArgs       []string    `json:",omitempty"`
	Context           string      `json:",omitempty"` // Older versions
	OriginOfCondition *ResourceID `json:",omitempty"`
	Oem               *Sensors    `json:",omitempty"` // Used only on for Cray RF events
}

type EventService

type EventService struct {
	EventTypesForSubscription []string `json:"EventTypesForSubscription"`
}

type EventSubscription

type EventSubscription struct {
	OContext         string `json:"@odata.context,omitempty"`
	Oid              string `json:"@odata.id,omitempty"`
	Otype            string `json:"@odata.type,omitempty"`
	Id               string `json:",omitempty"`
	Name             string `json:",omitempty"`
	Context          string `json:",omitempty"`
	Destination      string
	EventTypes       []string `json:",omitempty"`
	Protocol         string
	RegistryPrefixes []string `json:",omitempty"`
	Oem              *RFOem   `json:",omitempty"`
}

func (EventSubscription) String

func (eventSubscription EventSubscription) String() string

type EventSubscriptionCollection

type EventSubscriptionCollection struct {
	OType         string                     `json:"@odata.type"`
	Name          string                     `json:"Name"`
	MembersOCount int                        `json:"Members@odata.count"`
	Members       []EventSubscriptionOdataId `json:"Members"`
}

type EventSubscriptionOdataId

type EventSubscriptionOdataId struct {
	OId string `json:"@odata.id"`
}

type Events

type Events struct {
	OContext     string  `json:"@odata.context,omitempty"`
	Oid          string  `json:"@odata.id,omitempty"`
	Otype        string  `json:"@odata.type,omitempty"`
	Id           string  `json:"Id,omitempty"`
	Name         string  `json:"Name,omitempty"`
	Context      string  `json:"Context,omitempty"` // Later versions
	Description  string  `json:"Description,omitempty"`
	Events       []Event `json:"Events,omitempty"`
	EventsOCount int     `json:"Events@odata.count,omitempty"`
}

type Fan

type Fan struct {
	Name            string
	PhysicalContext string
	MemberId        string
	Reading         float64
}

type HPEPDUSensor

type HPEPDUSensor struct {
	DataSourceUri string  `json:"DataSourceUri"`
	Reading       float64 `json:"Reading"`
}

type KafkaBroker

type KafkaBroker struct {
	BrokerAddress string
	// This is going to seem like kind of a dumb way to do this, but we're going to need to lookup which topics a given
	// Kafka broker should get published A LOT. Like, every single message a lot. So we want this to be O(1) and a
	// map gives us that.
	TopicsToPublish map[string]interface{}

	KafkaConfig   *kafka.ConfigMap `json:"-"`
	KafkaProducer *kafka.Producer  `json:"-"`
}

Struct to support dealing with multiple Kafka instances.

func (KafkaBroker) String

func (broker KafkaBroker) String() string

type MainsCollection

type MainsCollection struct {
	Members []ResourceID `json:"Members"`
}

type Outlet

type Outlet struct {
	Id          string       `json:"Id"`
	Links       ResourceID   `json:"Links"`
	PowerState  string       `json:"PowerState"`
	Voltage     HPEPDUSensor `json:"Voltage"`
	CurrentAmps HPEPDUSensor `json:"CurrentAmps"`
	PowerWatts  HPEPDUSensor `json:"PowerWatts"`
	EnergykWh   HPEPDUSensor `json:"EnergykWh"`
}

type OutletCollection

type OutletCollection struct {
	Outlets []ResourceID `json:"Outlets"`
}

type Power

type Power struct {
	PowerControl  []PowerControl
	PowerSupplies []PowerSupply
	Voltages      []Voltage
}

type PowerControl

type PowerControl struct {
	PhysicalContext    string
	Name               string
	MemberId           string
	PowerConsumedWatts float64
	PowerMetrics       PowerMetrics
}

type PowerMetrics

type PowerMetrics struct {
	AverageConsumedWatts float64
	IntervalInMin        float64
	MaxConsumedWatts     float64
	MinConsumedWatts     float64
}

type PowerSupply

type PowerSupply struct {
	MemberId             string
	Name                 string
	LastPowerOutputWatts float64
	LineInputVoltage     float64
	PowerInputWatts      float64
	PowerOutputWatts     float64
}

type RFOem

type RFOem struct {
	EventTransmitIntervalSeconds int
}

type RFSub

type RFSub struct {
	Endpoint     *rf.RedfishEPDescription
	Status       *RFSubStatus
	PrefixGroups *[][]string
}

type RFSubStatus

type RFSubStatus int
const (
	RFSUBSTATUS_ERROR RFSubStatus = iota
	RFSUBSTATUS_PENDING
	RFSUBSTATUS_COMPLETE
)

type RackPDU

type RackPDU struct {
	Manufacturer string     `json:"Manufacturer"`
	Model        string     `json:"Model"`
	Outlets      ResourceID `json:"Outlets"`
	Branches     ResourceID `json:"Branches"`
	Mains        ResourceID `json:"Mains"`
}

type RedfishEndpoints

type RedfishEndpoints struct {
	Endpoints []rf.RedfishEPDescription `json:"RedfishEndpoints"`
}

type ResourceID

type ResourceID struct {
	Oid string `json:"@odata.id"`
}

type Sensors

type Sensors struct {
	Sensors         []CrayJSONPayload
	TelemetrySource string
}

type Systems

type Systems struct {
	// Literally the only thing we care about from all this is the model number.
	Model string
}

type Temperature

type Temperature struct {
	Name            string
	MemberId        string
	PhysicalContext string
	ReadingCelsius  float64
}

type Voltage

type Voltage struct {
	Name            string
	MemberId        string
	PhysicalContext string
	ReadingVolts    float64
}

Jump to

Keyboard shortcuts

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