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 ¶
func New(ctx context.Context, config *configpb.Configuration, wlmClient workloadmanager.WLMWriter) *OpenShiftMetrics
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.
Click to show internal directories.
Click to hide internal directories.