openshiftmetrics

package
v0.0.0-...-7370a3d Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package openshiftmetrics implements metric collection for the OpenShift workload agent service.

Index

Constants

View Source
const (
	// WLMNamespace is the namespace that the WLM agent is installed in.
	WLMNamespace = "workloadmanager"
	// Gibibyte is the number of bytes in a GiB.
	Gibibyte = 1024 * 1024 * 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricVersioning

type MetricVersioning struct {
	PayloadVersion string // The version of the metric payload.
	AgentVersion   string // The version of the agent that generated the metric payload.
}

MetricVersioning contains the versioning information for the metric agent and payload.

type OpenShiftMetrics

type OpenShiftMetrics struct {
	WLMClient       workloadmanager.WLMWriter
	K8sClient       *kubernetes.Clientset
	OpenShiftClient *openshift.Client
	// APIExtensionsClient is the client for the API extensions group.
	APIExtensionsClient *apiextensions.Clientset
}

OpenShiftMetrics contains variables and methods to collect metrics for OpenShift running on the current host.

func New

New initializes and returns the MetricCollector struct.

func (*OpenShiftMetrics) CollectMetrics

func (o *OpenShiftMetrics) CollectMetrics(ctx context.Context, versionData MetricVersioning) (*ompb.OpenshiftMetricsPayload, error)

CollectMetrics collects metrics about the Openshift cluster.

This is the entry point for collecting all OCP metrics.

func (*OpenShiftMetrics) Init

func (o *OpenShiftMetrics) Init(ctx context.Context) error

Init initializes the OpenShiftMetrics client and all dependencies.

func (*OpenShiftMetrics) SendMetricsToWLM

func (o *OpenShiftMetrics) SendMetricsToWLM(ctx context.Context, config *configpb.Configuration, payload *ompb.OpenshiftMetricsPayload) error

SendMetricsToWLM sends the metrics to the WLM API.

Directories

Path Synopsis
clients
openshift
Package openshift provides a client for interacting with Openshift clusters.
Package openshift provides a client for interacting with Openshift clusters.

Jump to

Keyboard shortcuts

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