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.
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
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>
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