collectors

package
v0.4.13 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 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 added in v0.4.13

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

func GetOcsV1alpha1Client added in v0.4.13

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

func RegisterCephBlocklistCollector added in v0.4.13

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 added in v0.4.11

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

RegisterPersistentVolumeAttributesCollector registers PV attribute colletor to registry

func RegisterRBDMirrorCollector added in v0.4.11

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

RegisterRBDMirrorCollector registers RBD mirror metrics collector to registry

Types

type AdvancedFeatureProvider added in v0.4.12

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

func NewCephClusterAdvancedFeatureProvider added in v0.4.12

func NewCephClusterAdvancedFeatureProvider(client *rookclient.Clientset) AdvancedFeatureProvider

func NewCephObjectStoreAdvancedFeatureProvider added in v0.4.12

func NewCephObjectStoreAdvancedFeatureProvider(client *rookclient.Clientset) AdvancedFeatureProvider

func NewCephRBDMirrorAdvancedFeatureProvider added in v0.4.12

func NewCephRBDMirrorAdvancedFeatureProvider(client *rookclient.Clientset) AdvancedFeatureProvider

func NewStorageClassAdvancedFeatureProvider added in v0.4.12

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 added in v0.4.13

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

func NewCephBlocklistCollector added in v0.4.13

func NewCephBlocklistCollector(blocklistStore *internalcache.CephBlocklistStore, pvStore *internalcache.PersistentVolumeStore, opts *options.Options) *CephBlocklistCollector

func (*CephBlocklistCollector) Collect added in v0.4.13

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

func (*CephBlocklistCollector) Describe added in v0.4.13

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

type CephClusterAdvancedFeatureProvider added in v0.4.12

type CephClusterAdvancedFeatureProvider struct {
	cache.SharedIndexInformer
}

func (*CephClusterAdvancedFeatureProvider) AdvancedFeature added in v0.4.12

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

type CephClusterCollector added in v0.4.10

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

CephClusterCollector is a custom collector for CephCluster Custom Resource

func NewCephClusterCollector added in v0.4.10

func NewCephClusterCollector(opts *options.Options) *CephClusterCollector

NewCephClusterCollector constructs a collector

func (*CephClusterCollector) Collect added in v0.4.10

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

Collect implements prometheus.Collector interface

func (*CephClusterCollector) Describe added in v0.4.10

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

Describe implements prometheus.Collector interface

func (*CephClusterCollector) Run added in v0.4.10

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

Run starts CephClusters informer

type CephObjectStoreAdvancedFeatureProvider added in v0.4.12

type CephObjectStoreAdvancedFeatureProvider struct {
	cache.SharedIndexInformer
}

func (*CephObjectStoreAdvancedFeatureProvider) AdvancedFeature added in v0.4.12

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 added in v0.4.12

type CephRBDMirrorAdvancedFeatureProvider struct {
	cache.SharedIndexInformer
}

func (*CephRBDMirrorAdvancedFeatureProvider) AdvancedFeature added in v0.4.12

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

type ClusterAdvanceFeatureCollector added in v0.4.12

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

func NewClusterAdvancedFeatureCollector added in v0.4.12

func NewClusterAdvancedFeatureCollector(opts *options.Options) *ClusterAdvanceFeatureCollector

NewClusterAdvancedFeatureCollector constructs the StorageCluster's advanced-feature collector

func (*ClusterAdvanceFeatureCollector) Collect added in v0.4.12

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

Collect implements prometheus.Collector interface

func (*ClusterAdvanceFeatureCollector) Describe added in v0.4.12

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

Describe implements prometheus.Collector interface

func (*ClusterAdvanceFeatureCollector) Run added in v0.4.12

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 added in v0.4.11

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

func NewPersistentVolumeAttributesCollector added in v0.4.11

func NewPersistentVolumeAttributesCollector(store *internalcache.PersistentVolumeStore, opts *options.Options) *PersistentVolumeAttributesCollector

func (*PersistentVolumeAttributesCollector) Collect added in v0.4.11

Collect implements prometheus.Collector interface

func (*PersistentVolumeAttributesCollector) Describe added in v0.4.11

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

Describe implements prometheus.Collector interface

type RBDMirrorCollector added in v0.4.11

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

func NewRBDMirrorCollector added in v0.4.11

func NewRBDMirrorCollector(mirrorStore *internalcache.RBDMirrorStore, pvStore *internalcache.PersistentVolumeStore, opts *options.Options) *RBDMirrorCollector

func (*RBDMirrorCollector) Collect added in v0.4.11

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

Collect implements prometheus.Collector interface

func (*RBDMirrorCollector) Describe added in v0.4.11

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

Describe implements prometheus.Collector interface

type StorageClassAdvancedFeatureProvider added in v0.4.12

type StorageClassAdvancedFeatureProvider struct {
	cache.SharedIndexInformer
}

func (*StorageClassAdvancedFeatureProvider) AdvancedFeature added in v0.4.12

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

type StorageClusterCollector added in v0.4.13

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

func NewStorageClusterCollector added in v0.4.13

func NewStorageClusterCollector(opts *options.Options) *StorageClusterCollector

func (*StorageClusterCollector) Collect added in v0.4.13

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

func (*StorageClusterCollector) Describe added in v0.4.13

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

func (*StorageClusterCollector) Run added in v0.4.13

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

type StorageClusterLister added in v0.4.13

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

func NewStorageClusterLister added in v0.4.13

func NewStorageClusterLister(indexer cache.Indexer) StorageClusterLister

type StorageConsumerCollector added in v0.4.13

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

func NewStorageConsumerCollector added in v0.4.13

func NewStorageConsumerCollector(opts *options.Options) *StorageConsumerCollector

func (*StorageConsumerCollector) Collect added in v0.4.13

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

func (*StorageConsumerCollector) Describe added in v0.4.13

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

func (*StorageConsumerCollector) Run added in v0.4.13

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

type StorageConsumerLister added in v0.4.13

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

func NewStorageConsumerLister added in v0.4.13

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