collectors

package
v4.0.0-...-065cb99 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CephObjectStoreInformer

func CephObjectStoreInformer(opts *options.Options) cache.SharedIndexInformer

func GetOcsV1Client

func GetOcsV1Client(opts *options.Options) (*rest.RESTClient, error)

func GetOcsV1alpha1Client

func GetOcsV1alpha1Client(opts *options.Options) (*rest.RESTClient, error)

func RegisterCephBlocklistCollector

func RegisterCephBlocklistCollector(registry *prometheus.Registry, opts *options.Options)

func RegisterCustomResourceCollectors

func RegisterCustomResourceCollectors(registry *prometheus.Registry, opts *options.Options)

RegisterCustomResourceCollectors registers the custom resource collectors in the given prometheus.Registry This is used to expose metrics about the Custom Resources

func RegisterPersistentVolumeAttributesCollector

func RegisterPersistentVolumeAttributesCollector(registry *prometheus.Registry, opts *options.Options)

RegisterPersistentVolumeAttributesCollector registers PV attribute collector to registry

func RegisterRBDMirrorCollector

func RegisterRBDMirrorCollector(registry *prometheus.Registry, opts *options.Options)

RegisterRBDMirrorCollector registers RBD mirror metrics collector to registry

Types

type AdvancedFeatureProvider

type AdvancedFeatureProvider interface {
	cache.SharedIndexInformer
	AdvancedFeature(namespaces ...string) int
}

func NewCephClusterAdvancedFeatureProvider

func NewCephClusterAdvancedFeatureProvider(opts *options.Options, client *rookclient.Clientset) AdvancedFeatureProvider

func NewCephObjectStoreAdvancedFeatureProvider

func NewCephObjectStoreAdvancedFeatureProvider(opts *options.Options, client *rookclient.Clientset) AdvancedFeatureProvider

func NewCephRBDMirrorAdvancedFeatureProvider

func NewCephRBDMirrorAdvancedFeatureProvider(opts *options.Options, client *rookclient.Clientset) AdvancedFeatureProvider

func NewStorageClassAdvancedFeatureProvider

func NewStorageClassAdvancedFeatureProvider(client *kubernetes.Clientset) AdvancedFeatureProvider

type CephBlockPoolCollector

type CephBlockPoolCollector struct {
	MirroringImageHealth *prometheus.Desc
	MirroringStatus      *prometheus.Desc
	Informer             cache.SharedIndexInformer
	AllowedNamespaces    []string
}

CephBlockPoolCollector is a custom collector for CephBlockPool Custom Resource

func NewCephBlockPoolCollector

func NewCephBlockPoolCollector(opts *options.Options) *CephBlockPoolCollector

NewCephBlockPoolCollector constructs a collector

func (*CephBlockPoolCollector) Collect

func (c *CephBlockPoolCollector) Collect(ch chan<- prometheus.Metric)

Collect implements prometheus.Collector interface

func (*CephBlockPoolCollector) Describe

func (c *CephBlockPoolCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector interface

func (*CephBlockPoolCollector) Run

func (c *CephBlockPoolCollector) Run(stopCh <-chan struct{})

Run starts CephBlockPool informer

type CephBlocklistCollector

type CephBlocklistCollector struct {
	CephBlocklistStore    *internalcache.CephBlocklistStore
	PersistentVolumeStore *internalcache.PersistentVolumeStore
	// Metrics Descriptors
	NodeRBDBlocklist *prometheus.Desc
	// contains filtered or unexported fields
}

func (*CephBlocklistCollector) Collect

func (c *CephBlocklistCollector) Collect(ch chan<- prometheus.Metric)

func (*CephBlocklistCollector) Describe

func (c *CephBlocklistCollector) Describe(ch chan<- *prometheus.Desc)

type CephClusterAdvancedFeatureProvider

type CephClusterAdvancedFeatureProvider struct {
	cache.SharedIndexInformer
}

func (*CephClusterAdvancedFeatureProvider) AdvancedFeature

func (c *CephClusterAdvancedFeatureProvider) AdvancedFeature(namespaces ...string) int

type CephClusterCollector

type CephClusterCollector struct {
	MirrorDaemonCount *prometheus.Desc
	LegacyOSD         *prometheus.Desc
	Informer          cache.SharedIndexInformer
	AllowedNamespaces []string
}

CephClusterCollector is a custom collector for CephCluster Custom Resource

func NewCephClusterCollector

func NewCephClusterCollector(opts *options.Options) *CephClusterCollector

NewCephClusterCollector constructs a collector

func (*CephClusterCollector) Collect

func (c *CephClusterCollector) Collect(ch chan<- prometheus.Metric)

Collect implements prometheus.Collector interface

func (*CephClusterCollector) Describe

func (c *CephClusterCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector interface

func (*CephClusterCollector) Run

func (c *CephClusterCollector) Run(stopCh <-chan struct{})

Run starts CephClusters informer

type CephObjectStoreAdvancedFeatureProvider

type CephObjectStoreAdvancedFeatureProvider struct {
	cache.SharedIndexInformer
}

func (*CephObjectStoreAdvancedFeatureProvider) AdvancedFeature

func (c *CephObjectStoreAdvancedFeatureProvider) AdvancedFeature(namespaces ...string) int

type CephObjectStoreCollector

type CephObjectStoreCollector struct {
	RGWHealthStatus   *prometheus.Desc
	Informer          cache.SharedIndexInformer
	AllowedNamespaces []string
}

CephObjectStoreCollector is a custom collector for CephObjectStore Custom Resource

func NewCephObjectStoreCollector

func NewCephObjectStoreCollector(opts *options.Options) *CephObjectStoreCollector

NewCephObjectStoreCollector constructs a collector

func (*CephObjectStoreCollector) Collect

func (c *CephObjectStoreCollector) Collect(ch chan<- prometheus.Metric)

Collect implements prometheus.Collector interface

func (*CephObjectStoreCollector) Describe

func (c *CephObjectStoreCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector interface

func (*CephObjectStoreCollector) Run

func (c *CephObjectStoreCollector) Run(stopCh <-chan struct{})

Run starts CephObjectStore informer

type CephRBDMirrorAdvancedFeatureProvider

type CephRBDMirrorAdvancedFeatureProvider struct {
	cache.SharedIndexInformer
}

func (*CephRBDMirrorAdvancedFeatureProvider) AdvancedFeature

func (c *CephRBDMirrorAdvancedFeatureProvider) AdvancedFeature(namespaces ...string) int

type ClusterAdvanceFeatureCollector

type ClusterAdvanceFeatureCollector struct {
	AdvancedFeature   *prometheus.Desc
	AllowedNamespaces []string
	// contains filtered or unexported fields
}

func NewClusterAdvancedFeatureCollector

func NewClusterAdvancedFeatureCollector(opts *options.Options) *ClusterAdvanceFeatureCollector

NewClusterAdvancedFeatureCollector constructs the StorageCluster's advanced-feature collector

func (*ClusterAdvanceFeatureCollector) Collect

func (c *ClusterAdvanceFeatureCollector) Collect(ch chan<- prometheus.Metric)

Collect implements prometheus.Collector interface

func (*ClusterAdvanceFeatureCollector) Describe

func (c *ClusterAdvanceFeatureCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector interface

func (*ClusterAdvanceFeatureCollector) Run

func (c *ClusterAdvanceFeatureCollector) Run(stopCh <-chan struct{})

Run starts all the SharedIndex informers

type Informer

type Informer interface {
	GetInformer() cache.SharedIndexInformer
}

type MockClient

type MockClient struct {
	// MockDo is a type that mock the Do method from the HTTP package
	MockDo MockDoType
}

MockClient is the mock of the HTTP Client It can be used to mock HTTP request/response from the rgw admin ops API

func (*MockClient) Do

func (m *MockClient) Do(req *http.Request) (*http.Response, error)

Do is the mock client's `Do` func

type MockDoType

type MockDoType func(req *http.Request) (*http.Response, error)

MockDoType is a custom type that allows setting the function that our Mock Do func will run instead

type ObjectBucketCollector

type ObjectBucketCollector struct {
	OBSizeTotal           *prometheus.Desc
	OBSizeMax             *prometheus.Desc
	OBObjectCountTotal    *prometheus.Desc
	OBObjectCountMax      *prometheus.Desc
	ObjectBucketClaimInfo *prometheus.Desc
	ObjectBucketCount     *prometheus.Desc
	Informer              cache.SharedIndexInformer
	AllowedNamespaces     []string
	// contains filtered or unexported fields
}

ObjectBucketCollector is a custom collector for CephObjectStore Custom Resource

func NewObjectBucketCollector

func NewObjectBucketCollector(opts *options.Options) *ObjectBucketCollector

NewObjectBucketCollector constructs a collector

func (*ObjectBucketCollector) Collect

func (c *ObjectBucketCollector) Collect(ch chan<- prometheus.Metric)

Collect implements prometheus.Collector interface

func (*ObjectBucketCollector) Describe

func (c *ObjectBucketCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector interface

func (*ObjectBucketCollector) Run

func (c *ObjectBucketCollector) Run(stopCh <-chan struct{})

Run starts CephObjectStore informer

type PersistentVolumeAttributesCollector

type PersistentVolumeAttributesCollector struct {
	Store      *internalcache.PersistentVolumeStore
	PVMetadata *prometheus.Desc
}

func (*PersistentVolumeAttributesCollector) Collect

Collect implements prometheus.Collector interface

func (*PersistentVolumeAttributesCollector) Describe

func (c *PersistentVolumeAttributesCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector interface

type RBDMirrorCollector

type RBDMirrorCollector struct {
	RBDMirrorStore        *internalcache.RBDMirrorStore
	PersistentVolumeStore *internalcache.PersistentVolumeStore
	// Metric descriptors
	MirrorDaemonHealth *prometheus.Desc
	ImageStatusState   *prometheus.Desc
}

func (*RBDMirrorCollector) Collect

func (c *RBDMirrorCollector) Collect(ch chan<- prometheus.Metric)

Collect implements prometheus.Collector interface

func (*RBDMirrorCollector) Describe

func (c *RBDMirrorCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector interface

type StorageClassAdvancedFeatureProvider

type StorageClassAdvancedFeatureProvider struct {
	cache.SharedIndexInformer
}

func (*StorageClassAdvancedFeatureProvider) AdvancedFeature

func (s *StorageClassAdvancedFeatureProvider) AdvancedFeature(_ ...string) int

type StorageClusterCollector

type StorageClusterCollector struct {
	KMSServerConnectionStatus *prometheus.Desc
	FailureDomainCount        *prometheus.Desc
	Informer                  cache.SharedIndexInformer
}

func NewStorageClusterCollector

func NewStorageClusterCollector(opts *options.Options) *StorageClusterCollector

func (*StorageClusterCollector) Collect

func (c *StorageClusterCollector) Collect(ch chan<- prometheus.Metric)

func (*StorageClusterCollector) Describe

func (c *StorageClusterCollector) Describe(ch chan<- *prometheus.Desc)

func (*StorageClusterCollector) Run

func (c *StorageClusterCollector) Run(stopCh <-chan struct{})

type StorageClusterLister

type StorageClusterLister interface {
	List(selector labels.Selector) (storageclusters []*ocsv1.StorageCluster, err error)
}

func NewStorageClusterLister

func NewStorageClusterLister(indexer cache.Indexer) StorageClusterLister

type StorageConsumerCollector

type StorageConsumerCollector struct {
	Informer                cache.SharedIndexInformer
	StorageConsumerMetadata *prometheus.Desc
	LastHeartbeat           *prometheus.Desc
	ProviderOperatorVersion *prometheus.Desc
	ClientOperatorVersion   *prometheus.Desc
	AllowedNamespace        string
}

func NewStorageConsumerCollector

func NewStorageConsumerCollector(opts *options.Options) *StorageConsumerCollector

func (*StorageConsumerCollector) Collect

func (c *StorageConsumerCollector) Collect(ch chan<- prometheus.Metric)

func (*StorageConsumerCollector) Describe

func (c *StorageConsumerCollector) Describe(ch chan<- *prometheus.Desc)

func (*StorageConsumerCollector) Run

func (c *StorageConsumerCollector) Run(stopCh <-chan struct{})

type StorageConsumerLister

type StorageConsumerLister interface {
	List(selector labels.Selector) (ret []*ocsv1alpha1.StorageConsumer, err error)
}

func NewStorageConsumerLister

func NewStorageConsumerLister(indexer cache.Indexer) StorageConsumerLister

type Tests

type Tests = []struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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