Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountCollector ¶
type AccountCollector struct { System System Client *govultr.Client Log logr.Logger // BandwidthCollector is a nested collector // It is used to collect bandwidth metrics // These comprise repeated metrics representing different periods of time BandwidthCollector BandwidthCollector Balance *prometheus.Desc PendingCharges *prometheus.Desc }
AccountCollector represents Account
func NewAccountCollector ¶
func NewAccountCollector(s System, client *govultr.Client, log logr.Logger) *AccountCollector
NewAccountCollector create a new AccountCollector
func (*AccountCollector) Collect ¶
func (c *AccountCollector) Collect(ch chan<- prometheus.Metric)
Collect implements Prometheus' Collector interface and is used to collect metrics
func (*AccountCollector) Describe ¶
func (c *AccountCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements Prometheus' Collector interface and is used to describe metrics
type BandwidthCollector ¶
type BandwidthCollector struct { System System Client *govultr.Client Log logr.Logger Previous BandwidthPeriodCollector Current BandwidthPeriodCollector Projected BandwidthPeriodCollector }
BandwidthCollector represents Account Bandwidth This comprises repeated (3) occurrences of BandwidthPeriod structs
func NewBandwidthCollector ¶
func NewBandwidthCollector(s System, client *govultr.Client, log logr.Logger) BandwidthCollector
NewBandwidthCollector creates a new BandwidthCollector
func (BandwidthCollector) Collect ¶
func (c BandwidthCollector) Collect(ch chan<- prometheus.Metric)
Collect implements Prometheus' Collector interface and is used to collect metrics
func (BandwidthCollector) Describe ¶
func (c BandwidthCollector) Describe(ch chan<- *prometheus.Desc)
Desc ribe implements Prometheus' Collector interface and is used to describe metrics
type BandwidthPeriodCollector ¶
type BandwidthPeriodCollector struct { System System Client *govultr.Client Log logr.Logger GBIn *prometheus.Desc GBOut *prometheus.Desc TotalInstanceHours *prometheus.Desc TotalInstanceCount *prometheus.Desc InstanceBandwidthCredits *prometheus.Desc FreeBandwidthCredits *prometheus.Desc PurchasedBandwidthCredits *prometheus.Desc Overage *prometheus.Desc OverageUnitCost *prometheus.Desc OverageCost *prometheus.Desc }
BandwidthPeriodCollector represents BandwidthPeriod It does not implement prometheus.Collector interface because Collect accepts BandwidthPeriod This is necessary because the Account.GetBandwidth returns a Bandwidth struct Containing multiple (3) copies of BandwidthPeriod structs
func NewBandwidthPeriod ¶
func NewBandwidthPeriod(s System, client *govultr.Client, log logr.Logger) BandwidthPeriodCollector
NewBandwidthPeriod creates a new BandwidthPeriodCollector
func (*BandwidthPeriodCollector) Collect ¶
func (c *BandwidthPeriodCollector) Collect(ch chan<- prometheus.Metric, p govultr.AccountBandwidthPeriod)
Collect collects metrics The underlying types are either int or float32 and so everything must be converted to float64
func (*BandwidthPeriodCollector) Describe ¶
func (c *BandwidthPeriodCollector) Describe(ch chan<- *prometheus.Desc)
Describe describes metrics
type BillingCollector ¶
type BillingCollector struct { System System Client *govultr.Client Log logr.Logger InvoiceItemCollectors []*InvoiceItemCollector }
BillingCollector represents billing related metrics
func NewBillingCollector ¶
func NewBillingCollector(s System, client *govultr.Client, log logr.Logger) *BillingCollector
NewBillingCollector creates a new BillingCollector
func (*BillingCollector) Collect ¶
func (c *BillingCollector) Collect(ch chan<- prometheus.Metric)
Collect implements Prometheus' Collector interface and is used to collect metrics
func (*BillingCollector) Describe ¶
func (c *BillingCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements Prometheus' Collector interface and is used to describe metrics
type BlockStorageCollector ¶
type BlockStorageCollector struct { System System Client *govultr.Client Log logr.Logger Up *prometheus.Desc Block *prometheus.Desc }
BlockStorageCollector represents Block Storage
func NewBlockStorageCollector ¶
func NewBlockStorageCollector(s System, client *govultr.Client, log logr.Logger) *BlockStorageCollector
NewBlockStorageCollector create a new BlockStorageCollector
func (*BlockStorageCollector) Collect ¶
func (c *BlockStorageCollector) Collect(ch chan<- prometheus.Metric)
Collect implements Prometheus' Collector interface and is used to collect metrics
func (*BlockStorageCollector) Describe ¶
func (c *BlockStorageCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements Prometheus' Collector interface and is used to describe metrics
type ExporterCollector ¶
type ExporterCollector struct { System System Build Build Log logr.Logger StartTime *prometheus.Desc BuildInfo *prometheus.Desc }
ExporterCollector collects metrics, mostly runtime, about this exporter in general.
func NewExporterCollector ¶
func NewExporterCollector(s System, b Build, log logr.Logger) *ExporterCollector
NewExporterCollector returns a new ExporterCollector.
func (*ExporterCollector) Collect ¶
func (c *ExporterCollector) Collect(ch chan<- prometheus.Metric)
Collect implements Prometheus' Collector interface and is used to collect metrics
func (*ExporterCollector) Describe ¶
func (c *ExporterCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements Prometheus' Collector interface and is used to describe metrics
type InvoiceItemCollector ¶
type InvoiceItemCollector struct { System System Client *govultr.Client Log logr.Logger Units *prometheus.Desc UnitPrice *prometheus.Desc Totals *prometheus.Desc }
InvoiceItemCollector represents a single invoice item
func NewInvoiceItemCollector ¶
func NewInvoiceItemCollector(s System, client *govultr.Client, log logr.Logger) *InvoiceItemCollector
NewInvoiceItemCollector creates a new InvoiceItemCollector This type does not implement Prometheus's Collector interface Because its Collect method additionally takes a *govultr.InvoiceItem
func (*InvoiceItemCollector) Collect ¶
func (c *InvoiceItemCollector) Collect(ch chan<- prometheus.Metric, invoiceItem *govultr.InvoiceItem)
Collect collects metrics
func (*InvoiceItemCollector) Describe ¶
func (c *InvoiceItemCollector) Describe(ch chan<- *prometheus.Desc)
Describe describes metrics
type KubernetesCollector ¶
type KubernetesCollector struct { System System Client *govultr.Client Log logr.Logger Up *prometheus.Desc NodePools *prometheus.Desc Nodes *prometheus.Desc }
KubernetesCollector represents Kubernetes Engine
func NewKubernetesCollector ¶
func NewKubernetesCollector(s System, client *govultr.Client, log logr.Logger) *KubernetesCollector
NewKubernetesCollector creates a new KubernetesCollector
func (*KubernetesCollector) Collect ¶
func (c *KubernetesCollector) Collect(ch chan<- prometheus.Metric)
Collect implements Prometheus' Collector interface and is used to collect metrics
func (*KubernetesCollector) Describe ¶
func (c *KubernetesCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements Prometheus' Collector interface and is used to describe metrics
type LoadBalancerCollector ¶
type LoadBalancerCollector struct { System System Client *govultr.Client Log logr.Logger Up *prometheus.Desc Instances *prometheus.Desc }
LoadBalancerCollector represents Load Balancers
func NewLoadBalancerCollector ¶
func NewLoadBalancerCollector(s System, client *govultr.Client, log logr.Logger) *LoadBalancerCollector
NewLoadBalancerCollector creates a new LoadBalancerCollector
func (*LoadBalancerCollector) Collect ¶
func (c *LoadBalancerCollector) Collect(ch chan<- prometheus.Metric)
Collect implements Prometheus' Collector interface and is used to collect metrics
func (*LoadBalancerCollector) Describe ¶
func (c *LoadBalancerCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements Prometheus' Collector interface and is used to Describe metrics
type ReservedIPsCollector ¶
type ReservedIPsCollector struct { System System Client *govultr.Client Log logr.Logger Up *prometheus.Desc }
ReservedIPsCollector represents Reserved IPs
func NewReservedIPsCollector ¶
func NewReservedIPsCollector(s System, client *govultr.Client, log logr.Logger) *ReservedIPsCollector
NewReservedIPsCollector creates a new ResevedIPsCollector
func (*ReservedIPsCollector) Collect ¶
func (c *ReservedIPsCollector) Collect(ch chan<- prometheus.Metric)
Collect implements Prometheus' Collector interface and is used to collect metrics
func (*ReservedIPsCollector) Describe ¶
func (c *ReservedIPsCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements Prometheus' Collector interface and is used to describe metrics