fixes an issue where can't get metrics in systemd journal
This commit is contained in:
parent
8e63fbbe8d
commit
4dda50457d
@ -612,7 +612,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()
|
||||
@ -700,7 +700,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
|
||||
|
Loading…
Reference in New Issue
Block a user