exporter

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package exporter provides a collector for Postfix stats.

Index

Constants

View Source
const (
	CollectorFile = iota
	CollectorJournald
)

Collector types.

Variables

View Source
var ErrUnsupportedCollector = errors.New("unsupported collector")

ErrUnsupportedCollector results from attempting to use a collector that is not currently supported.

Functions

This section is empty.

Types

type Exporter

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

Exporter collects Postfix stats from logs and exports them using the prometheus metrics package.

func New

func New(collectorType int, instance, logPath, journaldPath, journaldUnit string, logger log.Logger) (*Exporter, error)

New returns an initialized exporter.

func (*Exporter) Close

func (e *Exporter) Close() error

Close stops collecting new logs.

func (*Exporter) Collect

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

Collect delivers collected Postfix statistics 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 Postfix exporter. It implements prometheus.Collector.

Jump to

Keyboard shortcuts

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