collector

package
v0.0.0-...-6bb00cb Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountCollector

type AccountCollector struct {
	DropletLimit    *prometheus.Desc
	FloatingIPLimit *prometheus.Desc
	EmailVerified   *prometheus.Desc
	Active          *prometheus.Desc
	// contains filtered or unexported fields
}

AccountCollector collects metrics about the account.

func NewAccountCollector

func NewAccountCollector(logger log.Logger, errors *prometheus.CounterVec, client *godo.Client, timeout time.Duration) *AccountCollector

NewAccountCollector returns a new AccountCollector.

func (*AccountCollector) Collect

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

Collect is called by the Prometheus registry when collecting metrics.

func (*AccountCollector) Describe

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

Describe sends the super-set of all possible descriptors of metrics collected by this Collector.

type AppCollector

type AppCollector struct {
	App *prometheus.Desc
	// contains filtered or unexported fields
}

AppCollector collects metrics about all apps.

func NewAppCollector

func NewAppCollector(logger log.Logger, errors *prometheus.CounterVec, client *godo.Client, timeout time.Duration) *AppCollector

NewAppCollector returns a new AppCollector.

func (*AppCollector) Collect

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

Collect is called by the Prometheus registry when collecting metrics.

func (*AppCollector) Describe

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

Describe sends the super-set of all possible descriptors of metrics collected by this Collector.

type BalanceCollector

type BalanceCollector struct {
	MonthToDateBalance *prometheus.Desc
	AccountBalance     *prometheus.Desc
	MonthToDateUsage   *prometheus.Desc
	BalanceGeneratedAt *prometheus.Desc
	// contains filtered or unexported fields
}

BalanceCollector collects metrics about the account.

func NewBalanceCollector

func NewBalanceCollector(logger log.Logger, errors *prometheus.CounterVec, client *godo.Client, timeout time.Duration) *BalanceCollector

NewBalanceCollector returns a new BalanceCollector.

func (*BalanceCollector) Collect

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

Collect is called by the Prometheus registry when collecting metrics.

func (*BalanceCollector) Describe

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

Describe sends the super-set of all possible descriptors of metrics collected by this Collector.

type DBCollector

type DBCollector struct {
	DB      *prometheus.Desc
	DBNodes *prometheus.Desc
	// contains filtered or unexported fields
}

DBCollector collects metrics about all databases.

func NewDBCollector

func NewDBCollector(logger log.Logger, errors *prometheus.CounterVec, client *godo.Client, timeout time.Duration) *DBCollector

NewDBCollector returns a new DBCollector.

func (*DBCollector) Collect

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

Collect is called by the Prometheus registry when collecting metrics.

func (*DBCollector) Describe

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

Describe sends the super-set of all possible descriptors of metrics collected by this Collector.

type DOIncidentAPIResponse

type DOIncidentAPIResponse struct {
	Incidents []struct {
		Name string `json:"name"`
	} `json:"incidents"`
}

DOIncidentAPIResponse stores active digitalocean incidents with their Name(title) to extract the region name

func GetIncidents

func GetIncidents(client *http.Client) (DOIncidentAPIResponse, error)

GetIncidents fetches active incidents associated with digital ocean services

type DomainCollector

type DomainCollector struct {
	DomainRecordPort     *prometheus.Desc
	DomainRecordPriority *prometheus.Desc
	DomainRecordWeight   *prometheus.Desc
	DomainTTL            *prometheus.Desc
	// contains filtered or unexported fields
}

DomainCollector collects metrics about all images created by the user.

func NewDomainCollector

func NewDomainCollector(logger log.Logger, errors *prometheus.CounterVec, client *godo.Client, timeout time.Duration) *DomainCollector

NewDomainCollector returns a new DomainCollector.

func (*DomainCollector) Collect

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

Collect is called by the Prometheus registry when collecting metrics.

func (*DomainCollector) Describe

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

Describe sends the super-set of all possible descriptors of metrics collected by this Collector.

type DropletCollector

type DropletCollector struct {
	Up           *prometheus.Desc
	CPUs         *prometheus.Desc
	Memory       *prometheus.Desc
	Disk         *prometheus.Desc
	PriceHourly  *prometheus.Desc
	PriceMonthly *prometheus.Desc
	// contains filtered or unexported fields
}

DropletCollector collects metrics about all droplets.

func NewDropletCollector

func NewDropletCollector(logger log.Logger, errors *prometheus.CounterVec, client *godo.Client, timeout time.Duration) *DropletCollector

NewDropletCollector returns a new DropletCollector.

func (*DropletCollector) Collect

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

Collect is called by the Prometheus registry when collecting metrics.

func (*DropletCollector) Describe

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

Describe sends the super-set of all possible descriptors of metrics collected by this Collector.

type ExporterCollector

type ExporterCollector struct {
	StartTime *prometheus.Desc
	BuildInfo *prometheus.Desc
	// contains filtered or unexported fields
}

ExporterCollector collects metrics, mostly runtime, about this exporter in general.

func NewExporterCollector

func NewExporterCollector(logger log.Logger, version string, revision string, buildDate string, goVersion string, startTime time.Time) *ExporterCollector

NewExporterCollector returns a new ExporterCollector.

func (*ExporterCollector) Collect

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

Collect is called by the Prometheus registry when collecting metrics.

func (*ExporterCollector) Describe

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

Describe sends the super-set of all possible descriptors of metrics collected by this Collector.

type FloatingIPCollector

type FloatingIPCollector struct {
	Active *prometheus.Desc
	// contains filtered or unexported fields
}

FloatingIPCollector collects metrics about all floating ips.

func NewFloatingIPCollector

func NewFloatingIPCollector(logger log.Logger, errors *prometheus.CounterVec, client *godo.Client, timeout time.Duration) *FloatingIPCollector

NewFloatingIPCollector returns a new FloatingIPCollector.

func (*FloatingIPCollector) Collect

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

Collect is called by the Prometheus registry when collecting metrics.

func (*FloatingIPCollector) Describe

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

Describe sends the super-set of all possible descriptors of metrics collected by this Collector.

type ImageCollector

type ImageCollector struct {
	MinDiskSize *prometheus.Desc
	// contains filtered or unexported fields
}

ImageCollector collects metrics about all images created by the user.

func NewImageCollector

func NewImageCollector(logger log.Logger, errors *prometheus.CounterVec, client *godo.Client, timeout time.Duration) *ImageCollector

NewImageCollector returns a new ImageCollector.

func (*ImageCollector) Collect

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

Collect is called by the Prometheus registry when collecting metrics.

func (*ImageCollector) Describe

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

Describe sends the super-set of all possible descriptors of metrics collected by this Collector.

type IncidentCollector

type IncidentCollector struct {
	Incidents      *prometheus.Desc
	IncidentsTotal *prometheus.Desc
	// contains filtered or unexported fields
}

IncidentCollector collects number of active incidents associated with digital ocean services

func NewIncidentCollector

func NewIncidentCollector(logger log.Logger, errors *prometheus.CounterVec, timeout time.Duration) *IncidentCollector

NewIncidentCollector returns a new IncidentCollector.

func (*IncidentCollector) Collect

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

Collect is called by the Prometheus registry when collecting metrics.

func (*IncidentCollector) Describe

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

Describe sends the super-set of all possible descriptors of metrics collected by this Collector.

type KeyCollector

type KeyCollector struct {
	Key *prometheus.Desc
	// contains filtered or unexported fields
}

KeyCollector collects metrics about ssh keys added to the account.

func NewKeyCollector

func NewKeyCollector(logger log.Logger, errors *prometheus.CounterVec, client *godo.Client, timeout time.Duration) *KeyCollector

NewKeyCollector returns a new KeyCollector.

func (*KeyCollector) Collect

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

Collect is called by the Prometheus registry when collecting metrics.

func (*KeyCollector) Describe

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

Describe sends the super-set of all possible descriptors of metrics collected by this Collector.

type KubernetesCollector

type KubernetesCollector struct {
	Up        *prometheus.Desc
	NodePools *prometheus.Desc
	Nodes     *prometheus.Desc
	// contains filtered or unexported fields
}

KubernetesCollector collects metrics about Kubernetes clusters

func NewKubernetesCollector

func NewKubernetesCollector(logger log.Logger, errors *prometheus.CounterVec, client *godo.Client, timeout time.Duration) *KubernetesCollector

NewKubernetesCollector returns a new KubernetesCollector

func (*KubernetesCollector) Collect

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

Collect is called by the Prometheus registry when collecting metrics

func (*KubernetesCollector) Describe

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

Describe secnds the super-set of all possible descriptors of metrics collected by this Collector.

type LoadBalancerCollector

type LoadBalancerCollector struct {
	Droplets *prometheus.Desc
	Status   *prometheus.Desc
	// contains filtered or unexported fields
}

LoadBalancerCollector collects metrics about LoadBalancers of that account.

func NewLoadBalancerCollector

func NewLoadBalancerCollector(logger log.Logger, errors *prometheus.CounterVec, client *godo.Client, timeout time.Duration) *LoadBalancerCollector

NewLoadBalancerCollector returns a new LoadBalancerCollector.

func (*LoadBalancerCollector) Collect

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

Collect is called by the Prometheus registry when collecting metrics.

func (*LoadBalancerCollector) Describe

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

Describe sends the super-set of all possible descriptors of metrics collected by this Collector.

type SnapshotCollector

type SnapshotCollector struct {
	Size        *prometheus.Desc
	MinDiskSize *prometheus.Desc
	// contains filtered or unexported fields
}

SnapshotCollector collects metrics about all snapshots of droplets & volumes.

func NewSnapshotCollector

func NewSnapshotCollector(logger log.Logger, errors *prometheus.CounterVec, client *godo.Client, timeout time.Duration) *SnapshotCollector

NewSnapshotCollector returns a new SnapshotCollector.

func (*SnapshotCollector) Collect

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

Collect is called by the Prometheus registry when collecting metrics.

func (*SnapshotCollector) Describe

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

Describe sends the super-set of all possible descriptors of metrics collected by this Collector.

type SpacesCollector

type SpacesCollector struct {
	Bucket        *prometheus.Desc
	BucketCreated *prometheus.Desc
	// contains filtered or unexported fields
}

SpacesCollector collects metrics about all spaces buckets.

func NewSpacesCollector

func NewSpacesCollector(logger log.Logger, errors *prometheus.CounterVec, client *godo.Client, accessKeyID string, accessKeySecret string, timeout time.Duration) *SpacesCollector

SpacesCollector returns a new SpacesCollector.

func (*SpacesCollector) Collect

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

Collect is called by the Prometheus registry when collecting metrics.

func (*SpacesCollector) Describe

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

Describe sends the super-set of all possible descriptors of metrics collected by this Collector.

type VolumeCollector

type VolumeCollector struct {
	Size *prometheus.Desc
	// contains filtered or unexported fields
}

VolumeCollector collects metrics about all volumes.

func NewVolumeCollector

func NewVolumeCollector(logger log.Logger, errors *prometheus.CounterVec, client *godo.Client, timeout time.Duration) *VolumeCollector

NewVolumeCollector returns a new VolumeCollector.

func (*VolumeCollector) Collect

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

Collect is called by the Prometheus registry when collecting metrics.

func (*VolumeCollector) Describe

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

Describe sends the super-set of all possible descriptors of metrics collected by this Collector.

Jump to

Keyboard shortcuts

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