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 3 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
postfix_exporter
.idea/
12 changes: 12 additions & 0 deletions postfix_exporter.go
Original file line number Diff line number Diff line change
@@ -111,6 +111,12 @@ func CollectTextualShowqFromReader(file io.Reader, ch chan<- prometheus.Metric)
},
[]string{"queue"})

// Initialize all queue buckets to zero.
for _, q := range []string{"active", "hold", "other"} {
sizeHistogram.WithLabelValues(q)
ageHistogram.WithLabelValues(q)
}

now := time.Now()
location, _ := time.LoadLocation("Local")
for scanner.Scan() {
@@ -192,6 +198,12 @@ func CollectBinaryShowqFromReader(file io.Reader, ch chan<- prometheus.Metric) e
},
[]string{"queue"})

// Initialize all queue buckets to zero.
for _, q := range []string{"active", "deferred", "hold", "incoming", "maildrop"} {
sizeHistogram.WithLabelValues(q)
ageHistogram.WithLabelValues(q)
}

now := float64(time.Now().UnixNano()) / 1e9
queue := "unknown"
for scanner.Scan() {