Merge pull request #64 from k-kinzal/fixes-systemd-support
fixes an issue where can't get metrics in systemd journal
This commit is contained in:
commit
40c13b6ca0
@ -613,7 +613,7 @@ func NewPostfixExporter(showqPath string, logfilePath string, journal *Journal,
|
|||||||
func (e *PostfixExporter) Describe(ch chan<- *prometheus.Desc) {
|
func (e *PostfixExporter) Describe(ch chan<- *prometheus.Desc) {
|
||||||
ch <- postfixUpDesc
|
ch <- postfixUpDesc
|
||||||
|
|
||||||
if e.tailer == nil {
|
if e.tailer == nil && e.journal == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
ch <- e.cleanupProcesses.Desc()
|
ch <- e.cleanupProcesses.Desc()
|
||||||
@ -701,7 +701,7 @@ func (e *PostfixExporter) Collect(ch chan<- prometheus.Metric) {
|
|||||||
e.showqPath)
|
e.showqPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
if e.tailer == nil {
|
if e.tailer == nil && e.journal == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
ch <- e.cleanupProcesses
|
ch <- e.cleanupProcesses
|
||||||
|
Loading…
Reference in New Issue
Block a user