Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequestDuration ¶
func RequestDuration() *prometheus.HistogramVec
RequestDuration tracks the duration of API requests by collector.
func RequestFailures ¶
func RequestFailures() *prometheus.CounterVec
RequestFailures tracks the number of API failures by collector.
Types ¶
type GeneralCollector ¶
type GeneralCollector struct { StartTime *prometheus.Desc BuildInfo *prometheus.Desc // contains filtered or unexported fields }
GeneralCollector collects metrics, mostly runtime, about this exporter in general.
func NewGeneralCollector ¶
func NewGeneralCollector(version string, revision string, buildDate string, goVersion string, startTime time.Time) *GeneralCollector
NewGeneralCollector returns a new GeneralCollector.
func (*GeneralCollector) Collect ¶
func (c *GeneralCollector) Collect(ch chan<- prometheus.Metric)
Collect is called by the Prometheus registry when collecting metrics.
func (*GeneralCollector) Describe ¶
func (c *GeneralCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the super-set of all possible descriptors of metrics collected by this Collector.
type SSHKeyCollector ¶
type SSHKeyCollector struct { Key *prometheus.Desc // contains filtered or unexported fields }
SSHKeyCollector collects metrics about the SSH keys.
func NewSSHKeyCollector ¶
func NewSSHKeyCollector(logger log.Logger, client *hetzner.Client, failures *prometheus.CounterVec, duration *prometheus.HistogramVec, timeout time.Duration) *SSHKeyCollector
NewSSHKeyCollector returns a new SSHKeyCollector.
func (*SSHKeyCollector) Collect ¶
func (c *SSHKeyCollector) Collect(ch chan<- prometheus.Metric)
Collect is called by the Prometheus registry when collecting metrics.
func (*SSHKeyCollector) Describe ¶
func (c *SSHKeyCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the super-set of all possible descriptors of metrics collected by this Collector.
type ServerCollector ¶
type ServerCollector struct { Up *prometheus.Desc Traffic *prometheus.Desc Paid *prometheus.Desc Flatrate *prometheus.Desc Throttled *prometheus.Desc Cancelled *prometheus.Desc // contains filtered or unexported fields }
ServerCollector collects metrics about the account in general.
func NewServerCollector ¶
func NewServerCollector(logger log.Logger, client *hetzner.Client, failures *prometheus.CounterVec, duration *prometheus.HistogramVec, timeout time.Duration) *ServerCollector
NewServerCollector returns a new ServerCollector.
func (*ServerCollector) Collect ¶
func (c *ServerCollector) Collect(ch chan<- prometheus.Metric)
Collect is called by the Prometheus registry when collecting metrics.
func (*ServerCollector) Describe ¶
func (c *ServerCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the super-set of all possible descriptors of metrics collected by this Collector.