localmetrics

package
v0.0.0-...-2a80d7f Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LVDMetricsList = []prometheus.Collector{
		metricDiscoveredDevicesByLocalVolumeDiscovery,
	}

	LVMetricsList = []prometheus.Collector{
		metricLocalVolumeSetProvisionedPVs,
		metricLocalVolumeSetUnmatchedDisks,
		metricLocalVolumeSetOrphanedSymlinks,
		metricLocalVolumeProvisionedPVs,
		metricLocalVolumeOrphanedSymlinks,
	}
)

Functions

func CreateOrUpdateAlertRules

func CreateOrUpdateAlertRules(ctx context.Context, client client.Client, namespace string, diskmakerName string, ownerRefs []metav1.OwnerReference) error

CreateOrUpdateAlertRules installs all LSO alerting rules

func NewConfigBuilder

func NewConfigBuilder() *configBuilder

NewConfigBuilder initializes the config for the local server

func SetDiscoveredDevicesMetrics

func SetDiscoveredDevicesMetrics(nodeName string, deviceCount int)

func SetLVOrphanedSymlinksMetric

func SetLVOrphanedSymlinksMetric(nodeName, storageClassName string, count int)

func SetLVProvisionedPVMetric

func SetLVProvisionedPVMetric(nodeName, storageClassName string, count int)

func SetLVSOrphanedSymlinksMetric

func SetLVSOrphanedSymlinksMetric(nodeName, storageClassName string, count int)

func SetLVSProvisionedPVMetric

func SetLVSProvisionedPVMetric(nodeName, storageClassName string, count int)

func SetLVSUnmatchedDiskMetric

func SetLVSUnmatchedDiskMetric(nodeName, storageClassName string, count int)

Types

type Exporter

type Exporter struct {
	Ctx             context.Context
	Client          client.Client
	Name            string
	Namespace       string
	OwnerRefs       []metav1.OwnerReference
	AppLabel        string
	ServiceCertName string
}

func NewExporter

func NewExporter(ctx context.Context, client client.Client, name, namespace, certName string, ownerRefs []metav1.OwnerReference, appLabel string) *Exporter

func (*Exporter) EnableMetricsExporter

func (e *Exporter) EnableMetricsExporter() error

EnableMetricsExporter creates service and servicemonitor

Jump to

Keyboard shortcuts

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