exporter

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// prometheus exporter Namespace.
	Namespace = "wallix_bastion"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

type Exporter struct {
	Config config.Config
}

func NewExporter

func NewExporter(config config.Config) *Exporter

func (*Exporter) AuthenticateWallixAPI

func (e *Exporter) AuthenticateWallixAPI(metricsChannel chan<- prometheus.Metric, client *http.Client) (err error)

The first request done to wallix API. It allows to: - determine "up" metric for the exporter - prevent trying to fetch other metrics if down - retrieve the cookie to not have to authenticate subsequent requests Notice it uses "POST" methode in contrast to all other requests.

func (*Exporter) Collect

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

func (*Exporter) Describe

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

func (*Exporter) FetchWallixMetrics

func (e *Exporter) FetchWallixMetrics(
	metricsChannel chan<- prometheus.Metric, client *http.Client,
)

All other metrics fetched from the API essentially by counting the number of elements of list returned by different routes.

Jump to

Keyboard shortcuts

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