Commit Graph

64 Commits

Author SHA1 Message Date
Per Abich
72c753ff7d Merge remote-tracking branch 'netlogix/nlx_master'
# Conflicts:
#	postfix_exporter.go
2020-02-18 12:50:41 +01:00
Per Abich
851c00f29f Added a simple test and migrated to vgo 2020-02-12 13:41:29 +01:00
Per Abich
da5280083a Added extra build tags to enable testing on no-linux systems 2020-02-12 13:40:22 +01:00
Per Abich
b0a28deeca Added logging of log event source 2020-02-12 13:39:13 +01:00
Per Abich
365a2e307a Ignoring more files 2020-02-12 13:38:03 +01:00
Ivaylo Korakov
aa111672d4 Update docker file 2019-10-31 18:22:22 +01:00
Tim Stoop
0a237f860d
Merge pull request #30 from ljagiello/build-with-golang-image
Build binary with official golang image
2019-07-25 14:03:19 +02:00
Tim Stoop
9f69ed3c47
Merge pull request #29 from CamilionEU/evilham-new-metrics
New metrics cleanupNotAccepted and smtpDeferreds.
2019-07-25 14:02:21 +02:00
Tim Stoop
c43f4d9402
Merge pull request #33 from Azanx/prometheusHandlerFix
replace prometheus.Handler with promhttp.Handler
2019-07-25 13:59:41 +02:00
Azanx
689aedff1c replace prometheus.Handler with promhttp.Handler 2019-06-20 16:45:51 +02:00
Lienhart Woitok
0ca7f8207f
Merge pull request #2 from netlogix/ponert
[FIX] made metric smtp_status_deferred actually work
2019-04-15 19:50:37 +02:00
Andre Ponert
18a48b8d7d [FIX] made metric smtp_status_deferred actually work 2019-04-15 19:48:49 +02:00
Lienhart Woitok
7f5757e35c
Merge pull request #1 from netlogix/ponert
Added support for status=deferred metric
2019-04-15 19:01:51 +02:00
Andre Ponert
5ceffcde75 [FIX] consistent variable names 2019-04-15 18:57:32 +02:00
Andre Ponert
b925d46fcb Added support for status=deferred metric 2019-04-15 18:46:11 +02:00
Lukasz Jagiello
63db16cbcb
Build binary with official golang image
Ubuntu 16.04 use a very old Go version (1.6). It's better to use
official golang docker image with the latest golang release - 1.12.

Additionally I was able to fix #16 where `--systemd.enable` wasn't
working correctly.
2019-03-07 15:08:50 -08:00
Evilham
114311033f New metrics cleanupNotAccepted and smtpDeferreds.
This adds support for two new metrics:

* `cleanup_messages_not_accepted_total`
* `smtp_deferred_messages_total`.
2019-03-07 17:59:04 +01:00
Bart Vercoulen
af6943b1bc
Fixed Readme. 2019-02-15 12:41:28 +01:00
Bart Vercoulen
1b1c5f3489
Merge pull request #17 from eklitzke/tail
When following log files, tail them rather than truncate them.
2019-02-15 12:14:41 +01:00
Bart Vercoulen
a4e09a2c37
Merge branch 'master' into tail 2019-02-15 10:53:21 +01:00
Bart Vercoulen
623a840f32
Merge pull request #23 from kumina/kingpin_update
Refactored to kingpin and bugfix.
2019-02-15 10:51:19 +01:00
Bart Vercoulen
d73bd20065
Fixed formatting. 2019-02-15 10:41:53 +01:00
Bart Vercoulen
8bbd11f3cd
Merge pull request #26 from mjtrangoni/fix-error-handling
postfix_exporter.go: Handle the case where EOF is reached.
2019-02-13 10:16:09 +01:00
Mario Trangoni
27ac982de7 postfix_exporter.go: Handle the case where EOF is reached.
See these annoying messages,
Feb 06 13:34:03 hostname postfix_exporter[30713]: 2019/02/06 13:34:03 Could not read postfix output, EOF
Feb 06 13:34:27 hostname postfix_exporter[30713]: 2019/02/06 13:34:27 Could not read postfix output, EOF
Feb 06 13:35:27 hostname postfix_exporter[30713]: 2019/02/06 13:35:27 Could not read postfix output, EOF
Feb 06 13:36:27 hostname postfix_exporter[30713]: 2019/02/06 13:36:27 Could not read postfix output, EOF
Feb 06 13:37:27 hostname postfix_exporter[30713]: 2019/02/06 13:37:27 Could not read postfix output, EOF
Feb 06 13:38:27 hostname postfix_exporter[30713]: 2019/02/06 13:38:27 Could not read postfix output, EOF
Feb 06 13:39:27 hostname postfix_exporter[30713]: 2019/02/06 13:39:27 Could not read postfix output, EOF
Feb 06 13:40:27 hostname postfix_exporter[30713]: 2019/02/06 13:40:27 Could not read postfix output, EOF
Feb 06 13:41:27 hostname postfix_exporter[30713]: 2019/02/06 13:41:27 Could not read postfix output, EOF
Feb 06 13:42:27 hostname postfix_exporter[30713]: 2019/02/06 13:42:27 Could not read postfix output, EOF
2019-02-06 13:42:09 +01:00
Bart Vercoulen
f51b1f882d
Refactored to kingpin and fixed a EOF bug in CollectShowqFromReader. 2018-12-17 17:01:01 +01:00
Bart Vercoulen
1e650923d8
Merge pull request #22 from mjtrangoni/fix-megacheck-issues
postfix_exporter.go: Fix megacheck issues
2018-12-17 15:38:12 +01:00
Mario Trangoni
4d195655fd postfix_exporter.go: Fix megacheck issues
See,
$ gometalinter --vendor --deadline 10m --disable-all --enable=megacheck ./...
postfix_exporter.go:97:17⚠️ should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007) (megacheck)
postfix_exporter.go:276:40⚠️ should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007) (megacheck)
postfix_exporter.go:277:40⚠️ should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007) (megacheck)
postfix_exporter.go:278:40⚠️ should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007) (megacheck)
postfix_exporter.go:279:40⚠️ should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007) (megacheck)
postfix_exporter.go:280:40⚠️ should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007) (megacheck)
postfix_exporter.go:281:40⚠️ should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007) (megacheck)
postfix_exporter.go:282:40⚠️ should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007) (megacheck)
postfix_exporter.go:283:40⚠️ should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007) (megacheck)
postfix_exporter.go:284:40⚠️ should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007) (megacheck)
postfix_exporter.go:285:40⚠️ should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007) (megacheck)

Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
2018-12-16 10:56:41 +01:00
Bart Vercoulen
c4ddca4296
Merge pull request #20 from mjtrangoni/fix-linter-issues
Fix gosec issues
2018-12-13 12:09:33 +01:00
Mario Trangoni
a0059f793e systemd.go: Fix gosec issue.
See,
$ gometalinter --vendor ./...
systemd.go:49:⚠️ Errors unhandled.,LOW,HIGH (gosec)
2018-12-04 17:13:17 +01:00
Mario Trangoni
76f8dd448b postfix_exporter.go: Comment out unused CollectShowqFromFile function
See,
$ gometalinter --vendor ./...
postfix_exporter.go:256:1⚠️ CollectShowqFromFile is unused
(deadcode)
2018-12-04 16:50:01 +01:00
Mario Trangoni
b22b536722 .gitignore: Exclude binary and vim editor temporary files. 2018-12-04 16:48:06 +01:00
Mario Trangoni
7fa2e37607 postfix_exporter.go: Fix some gosec issues.
See,
$ gometalinter --vendor ./...
postfix_exporter.go:249:⚠️ Potential file inclusion via variable,MEDIUM,HIGH (gosec)
postfix_exporter.go:80:⚠️ Errors unhandled.,LOW,HIGH (gosec)
postfix_exporter.go:121:⚠️ Errors unhandled.,LOW,HIGH (gosec)
postfix_exporter.go:296:⚠️ Errors unhandled.,LOW,HIGH (gosec)
postfix_exporter.go:298:⚠️ Errors unhandled.,LOW,HIGH (gosec)
postfix_exporter.go:300:⚠️ Errors unhandled.,LOW,HIGH (gosec)
postfix_exporter.go:302:⚠️ Errors unhandled.,LOW,HIGH (gosec)
postfix_exporter.go:309:⚠️ Errors unhandled.,LOW,HIGH (gosec)
postfix_exporter.go:311:⚠️ Errors unhandled.,LOW,HIGH (gosec)
postfix_exporter.go:313:⚠️ Errors unhandled.,LOW,HIGH (gosec)
postfix_exporter.go:315:⚠️ Errors unhandled.,LOW,HIGH (gosec)
postfix_exporter.go:322:⚠️ Errors unhandled.,LOW,HIGH (gosec)
postfix_exporter.go:324:⚠️ Errors unhandled.,LOW,HIGH (gosec)
postfix_exporter.go:333:⚠️ Errors unhandled.,LOW,HIGH (gosec)
postfix_exporter.go:335:⚠️ Errors unhandled.,LOW,HIGH (gosec)
postfix_exporter.go:337:⚠️ Errors unhandled.,LOW,HIGH (gosec)
postfix_exporter.go:339:⚠️ Errors unhandled.,LOW,HIGH (gosec)
postfix_exporter.go:650:⚠️ Errors unhandled.,LOW,HIGH (gosec)
2018-12-04 16:48:06 +01:00
Bart Vercoulen
b3b6568777
Merge pull request #18 from jangrewe/master
add Dockefile
2018-11-06 13:53:47 +01:00
Jan Grewe
5e66ed0d00 add Dockefile 2018-11-04 02:57:56 +01:00
Evan Klitzke
b137412906
When following log files, tail them rather than truncate them. 2018-09-30 15:28:04 -07:00
Bart Vercoulen
b0c96895c2 Update readme and changelog for release. 2018-05-04 12:22:34 +02:00
Bart Vercoulen
2f94d55e93
Merge pull request #13 from silkeh/systemd-build-tag
Add nosystemd build tag
2018-05-04 12:00:00 +02:00
Silke
0c405faf87 Add nosystemd build tag
This allows building the exporter without systemd headers, eg:

    env CGO_ENABLED=0 go build -tags nosystemd

Closes #11
2018-04-19 13:34:18 +02:00
Bart Vercoulen
b572eeeb93
Merge pull request #12 from WilliButz/fix-systemd-journal-metrics
fix non-updating metrics from systemd-journal
2018-04-19 13:18:43 +02:00
WilliButz
ec3a8e5444
fix non-updating metrics from systemd-journal
fixes #10 where metrics metrics collected from the
systemd journal were not updated after some time
2018-04-15 15:47:06 +02:00
Bart Vercoulen
1d584386e4 Added CHANGELOG.md. 2018-02-23 14:12:43 +01:00
Bart Vercoulen
b1025cf55f
Merge pull request #9 from silkeh/systemd-readme
Document systemd usage
2018-02-14 08:47:11 +01:00
Silke
77dfb94499 Document systemd usage 2018-02-13 11:15:04 +01:00
Bart Vercoulen
fbe83f5c3e
Merge pull request #8 from kumina/init_histograms
Initialize histograms to zero
2018-02-08 15:01:47 +01:00
Bart Vercoulen
c1995d48d3 Comments added. 2018-02-07 15:12:35 +01:00
Bart Vercoulen
6569ec9d20 Initialize histograms to zero 2018-02-07 14:24:08 +01:00
Bart Vercoulen
d0b229822e build_static.sh updated to ubuntu docker container to support systemd journal usage. 2018-02-02 11:51:33 +01:00
Bart Vercoulen
0a26a0348b
Merge pull request #6 from silkeh/collect-from-journal
Implement collection from the systemd journal
2018-02-02 11:40:17 +01:00
Silke
82c04256dc Implement collection from the systemd journal
The following flags configure this usage:

- systemd.enable:       enable collection from systemd.
- systemd.unit:         systemd unit, postfix.service by default.
- systemd.slice:        systemd slice, overrides the unit.
- systemd.journal_path: path to the systemd journal directory.

Closes #2
2018-01-28 15:09:32 +01:00
Ed Schouten
a8b4bed735 Fix another poorly named metric. 2017-06-01 14:30:55 +02:00