exporter

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

type Exporter struct {
	// contains filtered or unexported fields
}

Exporter implements prometheus.Collector interface

func New

func New() *Exporter

New creates an instance of Exporter and returns it

func (*Exporter) Collect

func (e *Exporter) Collect(ch chan<- prometheus.Metric)

Collect satisfies prometheus.Collector interface

func (*Exporter) Describe

func (e *Exporter) Describe(ch chan<- *prometheus.Desc)

Describe satisfies prometheus.Collector interface

func (*Exporter) ExcludeGlobs

func (e *Exporter) ExcludeGlobs(g []string)

ExcludeGlobs sets the list of file globs the exporter uses to exclude matched certificate files from being scraped

func (*Exporter) IncludeGlobs

func (e *Exporter) IncludeGlobs(g []string)

IncludeGlobs sets the list of file globs the exporter uses to match certificate files for scraping

func (*Exporter) Scrape

func (e *Exporter) Scrape(ch chan<- prometheus.Metric)

Scrape iterates over the list of file paths (set by SetRoot) and parses any found x509 certificates. Certificates are parsed and the fields are mapped to prometheus labels which attached to a Gauge. Scrape will create a new time series for each certificate file with its associated labels. The value of the series equals the expiry of the certificate in seconds.

func (*Exporter) SetExcludeRoots

func (e *Exporter) SetExcludeRoots(p []string)

SetExcludeRoots sets the list of file paths that the exporter should exclude search for certificates in

func (*Exporter) SetRoots

func (e *Exporter) SetRoots(p []string)

SetRoots sets the list of file paths that the exporter should search for certificates in

Jump to

Keyboard shortcuts

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