[FIX] consistent variable names

This commit is contained in:
Andre Ponert 2019-04-15 18:57:32 +02:00
parent b925d46fcb
commit 5ceffcde75

View File

@ -285,7 +285,7 @@ var (
smtpdLostConnectionLine = regexp.MustCompile(`^lost connection after (\w+) from `)
smtpdSASLAuthenticationFailuresLine = regexp.MustCompile(`^warning: \S+: SASL \S+ authentication failed: `)
smtpdTLSLine = regexp.MustCompile(`^(\S+) TLS connection established from \S+: (\S+) with cipher (\S+) \((\d+)/(\d+) bits\)$`)
errorStatusDeferred = regexp.MustCompile(`, status=deferred`)
errorStatusDeferredLine = regexp.MustCompile(`, status=deferred`)
)
// CollectFromLogline collects metrict from a Postfix log line.
@ -418,7 +418,7 @@ func (e *PostfixExporter) CollectFromLogline(line string) {
e.unsupportedLogEntries.WithLabelValues(logMatches[1]).Inc()
}
} else if logMatches[1] == "error" {
if errorMatches := errorStatusDeferred.FindStringSubmatch(logMatches[2]) ; errorMatches != nil {
if errorMatches := errorStatusDeferredLine.FindStringSubmatch(logMatches[2]) ; errorMatches != nil {
e.errorStatusDeferred.Inc()
}
} else {