Initialize histograms to zero
This commit is contained in:
parent
d0b229822e
commit
6569ec9d20
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
postfix_exporter
|
||||
.idea/
|
||||
|
@ -111,6 +111,11 @@ func CollectTextualShowqFromReader(file io.Reader, ch chan<- prometheus.Metric)
|
||||
},
|
||||
[]string{"queue"})
|
||||
|
||||
for _, q := range []string{"active", "hold", "other"} {
|
||||
sizeHistogram.WithLabelValues(q)
|
||||
ageHistogram.WithLabelValues(q)
|
||||
}
|
||||
|
||||
now := time.Now()
|
||||
location, _ := time.LoadLocation("Local")
|
||||
for scanner.Scan() {
|
||||
@ -192,6 +197,11 @@ func CollectBinaryShowqFromReader(file io.Reader, ch chan<- prometheus.Metric) e
|
||||
},
|
||||
[]string{"queue"})
|
||||
|
||||
for _, q := range []string{"active", "deferred", "hold", "incoming", "maildrop"} {
|
||||
sizeHistogram.WithLabelValues(q)
|
||||
ageHistogram.WithLabelValues(q)
|
||||
}
|
||||
|
||||
now := float64(time.Now().UnixNano()) / 1e9
|
||||
queue := "unknown"
|
||||
for scanner.Scan() {
|
||||
|
Loading…
Reference in New Issue
Block a user