You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had the same problem. I already studied the code and thought that the problem is in the tail library, until I realized that there is an error in the readme, and tail cannot open the directory.
This appears to be similar to #54
logs are stored in /var/log/mail instead of /var/log/maillog, passing new logdir crashes on startup.
build@mail:~/INSTALL/postfix_exporter# ./postfix_exporter --postfix.logfile_path="/var/log/mail"
2020/10/05 00:09:24 Reading log events from /var/log/mail
2020/10/05 00:09:24 Listening on :9154
2020/10/05 00:09:24 Seeked /var/log/mail - &{Offset:0 Whence:2}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x832089]
goroutine 8 [running]:
main.(*PostfixExporter).CollectLogfileFromFile(0xc00016a000, 0x9e5740, 0xc000066700)
/postfix_exporter/postfix_exporter.go:437 +0x149
main.(*PostfixExporter).StartMetricCollection(0xc00016a000, 0x9e5740, 0xc000066700)
/postfix_exporter/postfix_exporter.go:671 +0xfd
created by main.main
/postfix_exporter/main.go:69 +0xecb
The text was updated successfully, but these errors were encountered: