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