项目作者: toliger

项目描述 :
Prometheus postfix exporter
高级语言: Go
项目地址: git://github.com/toliger/prometheus_postfix_exporter.git
创建时间: 2019-07-14T11:07:36Z
项目社区:https://github.com/toliger/prometheus_postfix_exporter

开源协议:Apache License 2.0

下载


Prometheus Postfix exporter

CircleCI
Go Report Card
GoDoc
Docker Pulls

This repository provides code for a Prometheus metrics exporter
for the Postfix mail server. This exporter
provides histogram metrics for the size and age of messages stored in
the mail queue. It extracts these metrics from Postfix by connecting to
a UNIX socket under /var/spool.

In addition to that, it counts events by parsing Postfix’s log entries,
using regular expression matching.
The log entries are retrieved from the systemd journal or from a log file.

Please refer to this utility’s main() function for a list of supported
command line flags.

Events from log file

The log file is tailed when processed. Rotating the log files while the exporter
is running is OK. The path to the log file is specified with the
--postfix.logfile_path flag.

Events from systemd

Retrieval from the systemd journal is enabled with the --systemd.enable flag.
This overrides the log file setting.
It is possible to specify the unit (with --systemd.unit) or slice (with --systemd.slice).
Additionally, it is possible to read the journal from a directory with the --systemd.journal_path flag.

Build

You can easily build the app with:

  1. make build

Credits

This project is a fork of this project