Skip to content

elastx/halon-smtpd-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

halon-smtpd-exporter

Basic Prometheus exporter for Halon SMTPD server.

It uses the control socket API to retrieve statistics from the local SMTP servers.

These are then formatted in the metrics format and served at http://localhost:9393/metrics (by default).

Config

The following environment variables are available:

Variable Description
HALON_SMTPD_EXPORTER_SOCKET_PATH Path to the control socket, default is /var/run/halon/smtpd.ctl
HALON_SMTPD_EXPORTER_LISTENADDR IP:Port for the webserver, default is :9393

Protobuf

You may need to build this with the Protobuf definitions matching your smtpd version. The definitions can be found here.

Clone this repo, grab the smtpd.proto file for your version.

Install protoc-gen-go:

go install google.golang.org/protobuf/cmd/protoc-gen-go@latest

Install protoc, for Debian/Ubuntu:

sudo apt install protobuf-compiler

Generate Golang types:

protoc -I=$(pwd) --go_out=$(pwd) --go_opt=Msmtpd.proto=pkg/halon_smtpd_ctl smtpd.proto

Now you can probably build the program:

go build -o halon-smtpd-exporter .

About

Prometheus exporter for Halon smtpd

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages