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.
Click to show internal directories.
Click to hide internal directories.