exporter

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Overview

Package exporter provides a collector for strongswan/libreswan IPsec stats.

Index

Constants

View Source
const (
	CollectorVICI = iota
	CollectorIpsec
)

Collector types.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

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

Exporter collects IPsec stats via a VICI protocol or an ipsec binary and exports them using the prometheus metrics package.

func New

func New(collectorType int, address *url.URL, timeout time.Duration, ipsecCmd []string, logger log.Logger) (*Exporter, error)

New returns an initialized exporter.

func (*Exporter) Collect

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

Collect fetches the statistics from strongswan/libreswan, and delivers them as Prometheus metrics. It implements prometheus.Collector.

func (*Exporter) Describe

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

Describe describes all the metrics exported by the IPsec exporter. It implements prometheus.Collector.

Jump to

Keyboard shortcuts

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