Skip to content

Commit

Permalink
Merge pull request kumina#64 from k-kinzal/fixes-systemd-support
Browse files Browse the repository at this point in the history
fixes an issue where can't get metrics in systemd journal
  • Loading branch information
BartVerc authored Mar 12, 2021
2 parents 01f0d6c + 4dda504 commit 40c13b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions postfix_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ func NewPostfixExporter(showqPath string, logfilePath string, journal *Journal,
func (e *PostfixExporter) Describe(ch chan<- *prometheus.Desc) {
ch <- postfixUpDesc

if e.tailer == nil {
if e.tailer == nil && e.journal == nil {
return
}
ch <- e.cleanupProcesses.Desc()
Expand Down Expand Up @@ -701,7 +701,7 @@ func (e *PostfixExporter) Collect(ch chan<- prometheus.Metric) {
e.showqPath)
}

if e.tailer == nil {
if e.tailer == nil && e.journal == nil {
return
}
ch <- e.cleanupProcesses
Expand Down

0 comments on commit 40c13b6

Please sign in to comment.