collector

package
v0.0.0-...-f98e46b Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

type Build struct {
	GitCommit string
	GoVersion string
	OsVersion string
	StartTime int64
}

Build is a type that represents the build info

type ChecksCollector

type ChecksCollector struct {
	System  System
	Client  *updown.Client
	Log     logr.Logger
	Enabled *prometheus.Desc
}

ChecksCollector is a type that represents updown Checks

func NewChecksCollector

func NewChecksCollector(s System, client *updown.Client, log logr.Logger) *ChecksCollector

NewChecksCollector is a function that returns a new ChecksCollector

func (*ChecksCollector) Collect

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

Collect implements Prometheus' Collector interface and is used to collect metrics

func (*ChecksCollector) Describe

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

Describe implements Prometheus' Collector interface 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 MetricsCollector

type MetricsCollector struct {
	System       System
	Client       *updown.Client
	Log          logr.Logger
	ResponseTime *prometheus.Desc
}

MetricsCollector is a type that represents updown Check Metrics

func NewMetricsCollector

func NewMetricsCollector(s System, client *updown.Client, log logr.Logger) *MetricsCollector

NewMetricsCollector is a function that returns a new MetricsCollector

func (*MetricsCollector) Collect

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

Collect implements Prometheus' Collector interface and is used to collect metrics

func (*MetricsCollector) Describe

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

Describe implements Prometheus' Collector interface and is used to describe metrics

type System

type System struct {
	Namespace string
	Subsystem string
	Version   string
}

System is a type that represents a Prometheus Exporter system

Jump to

Keyboard shortcuts

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