Skip to content

Commit

Permalink
Merge pull request #50 from UnikumAB/time-based-buckets
Browse files Browse the repository at this point in the history
Changed bucket sizes for Time measurements
  • Loading branch information
BartVerc authored Mar 12, 2021
2 parents 8e63fbb + 9cfeea8 commit 01f0d6c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions postfix_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ func NewPostfixExporter(showqPath string, logfilePath string, journal *Journal,
return nil, err
}
}
timeBuckets := []float64{1e-3, 1e-2, 1e-1, 1.0, 10, 1 * 60, 1 * 60 * 60, 24 * 60 * 60, 2 * 24 * 60 * 60}
return &PostfixExporter{
logUnsupportedLines: logUnsupportedLines,
showqPath: showqPath,
Expand All @@ -484,15 +485,15 @@ func NewPostfixExporter(showqPath string, logfilePath string, journal *Journal,
Namespace: "postfix",
Name: "lmtp_delivery_delay_seconds",
Help: "LMTP message processing time in seconds.",
Buckets: []float64{1e-3, 1e-2, 1e-1, 1e0, 1e1, 1e2, 1e3},
Buckets: timeBuckets,
},
[]string{"stage"}),
pipeDelays: prometheus.NewHistogramVec(
prometheus.HistogramOpts{
Namespace: "postfix",
Name: "pipe_delivery_delay_seconds",
Help: "Pipe message processing time in seconds.",
Buckets: []float64{1e-3, 1e-2, 1e-1, 1e0, 1e1, 1e2, 1e3},
Buckets: timeBuckets,
},
[]string{"relay", "stage"}),
qmgrInsertsNrcpt: prometheus.NewHistogram(prometheus.HistogramOpts{
Expand All @@ -517,7 +518,7 @@ func NewPostfixExporter(showqPath string, logfilePath string, journal *Journal,
Namespace: "postfix",
Name: "smtp_delivery_delay_seconds",
Help: "SMTP message processing time in seconds.",
Buckets: []float64{1e-3, 1e-2, 1e-1, 1e0, 1e1, 1e2, 1e3},
Buckets: timeBuckets,
},
[]string{"stage"}),
smtpTLSConnects: prometheus.NewCounterVec(
Expand Down

0 comments on commit 01f0d6c

Please sign in to comment.