Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from Upstream #2

Open
wants to merge 128 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
82c0425
Implement collection from the systemd journal
silkeh Jan 28, 2018
0a26a03
Merge pull request #6 from silkeh/collect-from-journal
BartVerc Feb 2, 2018
d0b2298
build_static.sh updated to ubuntu docker container to support systemd…
BartVerc Feb 2, 2018
6569ec9
Initialize histograms to zero
BartVerc Feb 7, 2018
c1995d4
Comments added.
BartVerc Feb 7, 2018
fbe83f5
Merge pull request #8 from kumina/init_histograms
BartVerc Feb 8, 2018
77dfb94
Document systemd usage
silkeh Feb 13, 2018
b1025cf
Merge pull request #9 from silkeh/systemd-readme
BartVerc Feb 14, 2018
1d58438
Added CHANGELOG.md.
BartVerc Feb 23, 2018
ec3a8e5
fix non-updating metrics from systemd-journal
WilliButz Apr 15, 2018
b572eee
Merge pull request #12 from WilliButz/fix-systemd-journal-metrics
BartVerc Apr 19, 2018
0c405fa
Add nosystemd build tag
silkeh Apr 15, 2018
2f94d55
Merge pull request #13 from silkeh/systemd-build-tag
BartVerc May 4, 2018
b0c9689
Update readme and changelog for release.
BartVerc May 4, 2018
b137412
When following log files, tail them rather than truncate them.
eklitzke Sep 30, 2018
5e66ed0
add Dockefile
jangrewe Nov 4, 2018
b3b6568
Merge pull request #18 from jangrewe/master
BartVerc Nov 6, 2018
7fa2e37
postfix_exporter.go: Fix some gosec issues.
mjtrangoni Dec 4, 2018
b22b536
.gitignore: Exclude binary and vim editor temporary files.
mjtrangoni Dec 4, 2018
76f8dd4
postfix_exporter.go: Comment out unused `CollectShowqFromFile` function
mjtrangoni Dec 4, 2018
a0059f7
systemd.go: Fix gosec issue.
mjtrangoni Dec 4, 2018
c4ddca4
Merge pull request #20 from mjtrangoni/fix-linter-issues
BartVerc Dec 13, 2018
4d19565
postfix_exporter.go: Fix megacheck issues
mjtrangoni Dec 16, 2018
1e65092
Merge pull request #22 from mjtrangoni/fix-megacheck-issues
BartVerc Dec 17, 2018
f51b1f8
Refactored to kingpin and fixed a EOF bug in CollectShowqFromReader.
BartVerc Dec 17, 2018
27ac982
postfix_exporter.go: Handle the case where EOF is reached.
mjtrangoni Feb 6, 2019
8bbd11f
Merge pull request #26 from mjtrangoni/fix-error-handling
BartVerc Feb 13, 2019
d73bd20
Fixed formatting.
BartVerc Feb 15, 2019
623a840
Merge pull request #23 from kumina/kingpin_update
BartVerc Feb 15, 2019
a4e09a2
Merge branch 'master' into tail
BartVerc Feb 15, 2019
1b1c5f3
Merge pull request #17 from eklitzke/tail
BartVerc Feb 15, 2019
af6943b
Fixed Readme.
BartVerc Feb 15, 2019
acf7a97
Use Go modules
corny Jan 28, 2019
99db001
Update Dockerfile to use Go 1.11 with modules
corny Jan 28, 2019
243cb79
Reduce indentation
corny Jan 28, 2019
7072c52
Small refactoring
corny Jan 28, 2019
43221af
Move main function to main.go
corny Feb 20, 2019
8e333e7
Update dependencies
corny Feb 20, 2019
1143110
New metrics cleanupNotAccepted and smtpDeferreds.
evilham Mar 7, 2019
63db16c
Build binary with official golang image
Mar 7, 2019
b925d46
Added support for status=deferred metric
aponert Apr 15, 2019
5ceffcd
[FIX] consistent variable names
aponert Apr 15, 2019
7f5757e
Merge pull request #1 from netlogix/ponert
liwo Apr 15, 2019
18a48b8
[FIX] made metric smtp_status_deferred actually work
aponert Apr 15, 2019
0ca7f82
Merge pull request #2 from netlogix/ponert
liwo Apr 15, 2019
689aedf
replace prometheus.Handler with promhttp.Handler
Azanx Jun 20, 2019
c43f4d9
Merge pull request #33 from Azanx/prometheusHandlerFix
timstoop Jul 25, 2019
9f69ed3
Merge pull request #29 from CamilionEU/evilham-new-metrics
timstoop Jul 25, 2019
0a237f8
Merge pull request #30 from ljagiello/build-with-golang-image
timstoop Jul 25, 2019
aa11167
Update docker file
Oct 31, 2019
365a2e3
Ignoring more files
Feb 12, 2020
b0a28de
Added logging of log event source
Feb 12, 2020
da52800
Added extra build tags to enable testing on no-linux systems
Feb 12, 2020
851c00f
Added a simple test and migrated to vgo
Feb 12, 2020
72c753f
Merge remote-tracking branch 'netlogix/nlx_master'
Feb 18, 2020
3e8a3a4
Cleaning up the Dockerfile
Feb 18, 2020
26d0642
Moved the collection of stats into its own go routine
Feb 18, 2020
574e478
Removed unused variable
Feb 18, 2020
e416d73
Fixed test
Feb 18, 2020
3af4390
- Added flag for logging lines that were not processed (mainly for de…
Feb 18, 2020
eab41da
Fixed compile failure
Feb 18, 2020
7428bf4
Added better counting of unsupported lines
Feb 19, 2020
b268207
Merge remote-tracking branch 'digineo/refactoring' into digineo-updates
Feb 19, 2020
d23c664
Fixing merge issues
Feb 19, 2020
3071189
added go.sum
Feb 19, 2020
fd473ea
Merge remote-tracking branch 'digineo/gomod' into digineo-updates
Feb 19, 2020
2e1ca8f
ran "go mod tidy" after merge
Feb 19, 2020
c598c82
Merge pull request #2 from UnikumAB/digineo-updates
flyhard Feb 19, 2020
853b880
small thing
Feb 21, 2020
7585191
Merge pull request #40 from UnikumAB/master
Ivaylo-Korakov Feb 21, 2020
69a7101
Merge pull request #42 from kumina/UnikumAB/master
Ivaylo-Korakov Feb 21, 2020
0436fed
Making test easier to use
flyhard Feb 22, 2020
0ca70fa
Created a test for Issue #35 and suggested a solution
flyhard Feb 22, 2020
8113240
Reduced the cardinality of postfix_smtpd_messages_processed_total for…
flyhard Feb 23, 2020
9800cf8
Added missing descriptions
Feb 24, 2020
7fff156
Merge pull request #43 from UnikumAB/Issue#35
Ivaylo-Korakov Feb 24, 2020
52ac464
Merge pull request #44 from UnikumAB/Issue#38
Ivaylo-Korakov Feb 24, 2020
bc2175f
Adding some test for the showq part. Found a minor bug.
Feb 24, 2020
0216235
Merge remote-tracking branch 'kumina/master'
Feb 24, 2020
ca63474
Fixing issue with collecting delays
Feb 24, 2020
b17eed2
Fixing issue with collecting smtpdProcesses without Sasl
Feb 24, 2020
a1f115b
Added Travis config file
Feb 25, 2020
3e20a86
Added Travis config file
Feb 25, 2020
be9aeb4
Added libsystemd-dev package to travis build env.
Feb 25, 2020
9daef83
Better config for travis
Feb 25, 2020
1456fb0
Added Travis config file
Feb 25, 2020
208f99c
Added Travis config file
Feb 25, 2020
8dd2215
Added libsystemd-dev package to travis build env.
Feb 25, 2020
23c2967
Better config for travis
Feb 25, 2020
63673cd
Merge branch 'Added-missing-descriptions'
Feb 25, 2020
d03d270
#14: Removed leftover info about truncating the logfile. Also changed…
Feb 26, 2020
a8a53bd
Merge branch 'Fixing-startup-flag'
Feb 26, 2020
805425c
Merge pull request #45 from UnikumAB/Added-missing-descriptions
Ivaylo-Korakov Feb 26, 2020
e17ab80
Merge branch 'UnikumAB-master'
Feb 26, 2020
b0b31e3
Merge branch 'master' of github.com:kumina/postfix_exporter
Feb 26, 2020
9cfeea8
Made the buckets sizes for Histograms measuring seconds into more "hu…
Feb 28, 2020
a85bda5
fixes panic appears when tailer is nil
k-kinzal Apr 22, 2020
046eb3d
Updated README
May 15, 2020
b07b6f4
fix smtpd TLS connection regex
martinkoerper May 23, 2020
533b55d
Merge pull request #58 from martinkoerper/fix-regex
BartVerc Jun 30, 2020
bbcbead
Merge pull request #57 from pard68/UPDATE/readme
BartVerc Jun 30, 2020
8e63fbb
Merge pull request #54 from k-kinzal/fixes-panic-logfilepath-empty
BartVerc Jun 30, 2020
1451d25
Splits the log source handling with a pluggable interface.
tommie Jun 20, 2020
c588b34
Adds a Docker log source.
tommie Jun 21, 2020
4dda504
fixes an issue where can't get metrics in systemd journal
k-kinzal Jul 20, 2020
01f0d6c
Merge pull request #50 from UnikumAB/time-based-buckets
BartVerc Mar 12, 2021
40c13b6
Merge pull request #64 from k-kinzal/fixes-systemd-support
BartVerc Mar 12, 2021
de70743
Merge branch 'master' into docker
BartVerc Mar 16, 2021
9d31460
Merge pull request #60 from tommie/docker
BartVerc Mar 16, 2021
1edadd0
Revert "Adds a Docker log source."
BartVerc Mar 16, 2021
efcf247
Merge pull request #72 from kumina/revert-60-docker
BartVerc Mar 16, 2021
82fa993
Splits the log source handling with a pluggable interface.
tommie Jun 20, 2020
f1d5d0a
Adds a Docker log source.
tommie Jun 21, 2020
b050cdf
Merge pull request #73 from kumina/docker
BartVerc Mar 16, 2021
3abd6f4
Add metric by status for all message processed by smtp
paradis Apr 7, 2021
6531beb
Add metric for non delivery notifications from bounce
paradis Apr 7, 2021
8966f65
Add another metric for mails delivered locally
paradis Apr 7, 2021
4470123
Track the number of expired emails form logs
paradis Apr 14, 2021
0523537
Expose the severity of unsupported lines
paradis Apr 14, 2021
ec57499
Fix: Default for mail log path
ylecuyer May 2, 2021
d99e38e
update changelog
ylecuyer May 2, 2021
6039f07
Update tail from hpcloud/tail to nxadm/tail
piotr1212 May 12, 2021
2eb4b58
remove hpcloud/tail from go.mod
piotr1212 Aug 16, 2021
35f158a
Merge pull request #79 from piotr1212/PP-tail
BartVerc Aug 17, 2021
5a8f146
Merge pull request #77 from ylecuyer/fix-mail-log-default-yle
BartVerc Aug 17, 2021
cbc36a3
Upgrade golang to 1.16
Aug 31, 2021
580003c
Merge pull request #82 from hooten/go-1-16
BartVerc Oct 19, 2021
a6f58e9
Merge pull request #75 from paradis/master
BartVerc Oct 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ This exporter provides histogram metrics for the size and age of messages stored
the mail queue. It extracts these metrics from Postfix by connecting to
a UNIX socket under `/var/spool`. It also counts events by parsing Postfix's
log entries, using regular expression matching. The log entries are retrieved from
the systemd journal, the Docker logs, or from a log file.
the systemd journal or from a log file.

## Options

@@ -18,25 +18,11 @@ These options can be used when starting the `postfix_exporter`
| `--postfix.showq_path` | Path at which Postfix places its showq socket | `/var/spool/postfix/public/showq` |
| `--postfix.logfile_path` | Path where Postfix writes log entries | `/var/log/maillog` |
| `--log.unsupported` | Log all unsupported lines | `false` |
| `--docker.enable` | Read from the Docker logs instead of a file | `false` |
| `--docker.container.id` | The container to read Docker logs from | `postfix` |
| `--systemd.enable` | Read from the systemd journal instead of file | `false` |
| `--systemd.enable` | Read from the systemd journal instead of log | `false` |
| `--systemd.unit` | Name of the Postfix systemd unit | `postfix.service` |
| `--systemd.slice` | Name of the Postfix systemd slice. | `""` |
| `--systemd.journal_path` | Path to the systemd journal | `""` |

## Events from Docker

Postfix servers running in a [Docker](https://www.docker.com/)
container can be monitored using the `--docker.enable` flag. The
default container ID is `postfix`, but can be customized with the
`--docker.container.id` flag.

The default is to connect to the local Docker, but this can be
customized using [the `DOCKER_HOST` and
similar](https://pkg.go.dev/github.com/docker/docker/client?tab=doc#NewEnvClient)
environment variables.

## Events from log file

The log file is tailed when processed. Rotating the log files while the exporter
7 changes: 0 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
@@ -5,15 +5,8 @@ go 1.13
require (
github.com/alecthomas/kingpin v2.2.6+incompatible
github.com/coreos/go-systemd/v22 v22.0.0
github.com/docker/distribution v2.7.1+incompatible // indirect
github.com/docker/docker v1.13.1
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/fsnotify/fsnotify v1.4.7 // indirect
github.com/hpcloud/tail v1.0.0
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/prometheus/client_golang v1.4.1
github.com/prometheus/client_model v0.2.0
github.com/stretchr/testify v1.4.0
12 changes: 0 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
@@ -17,14 +17,6 @@ github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug=
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v1.13.1 h1:IkZjBSIc8hBjLpqeAbeE5mca5mNgeatLHBy3GO78BWo=
github.com/docker/docker v1.13.1/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw=
github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
@@ -61,10 +53,7 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
@@ -94,7 +83,6 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowKpJ8y4AmooUzdBSR9GU=
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
64 changes: 0 additions & 64 deletions logsource.go

This file was deleted.

96 changes: 0 additions & 96 deletions logsource_docker.go

This file was deleted.

79 changes: 0 additions & 79 deletions logsource_docker_test.go

This file was deleted.

Loading