-
Notifications
You must be signed in to change notification settings - Fork 141
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
journald metrics not available #55
Comments
Additionally, I've run the exporter with a debugger and the CollectFromLogLine function is not reached. |
I believe postfix_exporter currently only reads the log once, and stops on first 0-length read. |
I co-maintain the Debian package prometheus-postfix-exporter, and have also just recently discovered that systemd journal support inexplicably broke somewhere between v0.2.0 and v0.3.0. This is somewhat disappointing, since v0.2.0 was working quite reliably. From the minimal debugging that I've done so far, it appears to bail out of the func (s *SystemdLogSource) Read(ctx context.Context) (string, error) {
c, err := s.journal.Next()
if err != nil {
return "", err
}
if c == 0 {
return "", io.EOF
}
e, err := s.journal.GetEntry()
... That subsequently causes the for-loop in By commenting out the "Start at end of journal" seek in logsource_systemd.go, I can get the exporter to "replay" historical systemd journal entries, and it appears to produce the expected metrics. However, when it reaches the end of the events, the |
This might also be an issue with recent versions of go-systemd: coreos/go-systemd#392 |
I did some digging today because this bothered me a bit:
|
When running
postfix_exporter
built from master,journald
metrics are not available, and there is only a single path for thepostfix_up
metric present when querying the exporter.The exporter is printing "Reading log events from systemd" on startup.
Bisecting with git reveals that commit 26d0642 introduced the issue.
The text was updated successfully, but these errors were encountered: