@@ -59,7 +59,7 @@ func TestPostfixExporter_CollectFromLogline(t *testing.T) {
59
59
smtpMessagesProcessed int
60
60
smtpDeferred int
61
61
smtpBounced int
62
- bounceNonDelivery int
62
+ bounceNonDelivery int
63
63
virtualDelivered int
64
64
unsupportedLogEntries []testCounterMetric
65
65
}
@@ -133,10 +133,10 @@ func TestPostfixExporter_CollectFromLogline(t *testing.T) {
133
133
"Apr 10 14:50:16 mail postfix/qmgr[3663]: BACE842E72: from=<noreply@domain.com>, status=expired, returned to sender" ,
134
134
"Apr 10 14:50:16 mail postfix/qmgr[3663]: BACE842E73: from=<noreply@domain.com>, status=force-expired, returned to sender" ,
135
135
},
136
- expiredCount : 2 ,
136
+ expiredCount : 2 ,
137
137
},
138
138
fields : fields {
139
- qmgrExpires : prometheus .NewCounter (prometheus.CounterOpts {}),
139
+ qmgrExpires : prometheus .NewCounter (prometheus.CounterOpts {}),
140
140
},
141
141
},
142
142
{
@@ -152,7 +152,7 @@ func TestPostfixExporter_CollectFromLogline(t *testing.T) {
152
152
},
153
153
fields : fields {
154
154
smtpdSASLAuthenticationFailures : prometheus .NewCounter (prometheus.CounterOpts {}),
155
- unsupportedLogEntries : prometheus .NewCounterVec (prometheus.CounterOpts {}, []string {"service" , "level" }),
155
+ unsupportedLogEntries : prometheus .NewCounterVec (prometheus.CounterOpts {}, []string {"service" , "level" }),
156
156
smtpProcesses : prometheus .NewCounterVec (prometheus.CounterOpts {}, []string {"status" }),
157
157
},
158
158
},
@@ -180,9 +180,9 @@ func TestPostfixExporter_CollectFromLogline(t *testing.T) {
180
180
"Jul 24 04:38:17 mail postfix/smtp[30582]: Verified TLS connection established to gmail-smtp-in.l.google.com[108.177.14.26]:25: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256" ,
181
181
"Jul 24 03:28:15 mail postfix/smtp[24052]: Verified TLS connection established to mx2.comcast.net[2001:558:fe21:2a::6]:25: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)" ,
182
182
},
183
- removedCount : 0 ,
184
- saslFailedCount : 0 ,
185
- outgoingTLS : 2 ,
183
+ removedCount : 0 ,
184
+ saslFailedCount : 0 ,
185
+ outgoingTLS : 2 ,
186
186
smtpdMessagesProcessed : 0 ,
187
187
},
188
188
fields : fields {
@@ -204,7 +204,7 @@ func TestPostfixExporter_CollectFromLogline(t *testing.T) {
204
204
smtpMessagesProcessed : 1 ,
205
205
},
206
206
fields : fields {
207
- smtpDelays : prometheus .NewHistogramVec (prometheus.HistogramOpts {}, []string {"stage" }),
207
+ smtpDelays : prometheus .NewHistogramVec (prometheus.HistogramOpts {}, []string {"stage" }),
208
208
smtpProcesses : prometheus .NewCounterVec (prometheus.CounterOpts {}, []string {"status" }),
209
209
},
210
210
},
@@ -217,19 +217,19 @@ func TestPostfixExporter_CollectFromLogline(t *testing.T) {
217
217
"Dec 29 03:03:48 mail postfix/smtp[8492]: 732BB407C3: to=<redacted@domain.com>, relay=mail.domain.com[1.1.1.1]:25, delay=582, delays=563/16/1.7/0.81, dsn=5.0.0, status=bounced (host mail.domain.com[1.1.1.1] said: 554 DT:SPM 163 mx9,O8CowEDJVFKCokVaRhz+AA--.26016S3 1514513028,please see http://mail.domain.com/help/help_spam.htm?ip= (in reply to end of DATA command))" ,
218
218
"Dec 29 03:03:48 mail postfix/bounce[9321]: 732BB407C3: sender non-delivery notification: 5DE184083C" ,
219
219
},
220
- smtpMessagesProcessed : 2 ,
221
- smtpDeferred : 1 ,
222
- smtpBounced : 1 ,
223
- bounceNonDelivery : 1 ,
220
+ smtpMessagesProcessed : 2 ,
221
+ smtpDeferred : 1 ,
222
+ smtpBounced : 1 ,
223
+ bounceNonDelivery : 1 ,
224
224
},
225
225
fields : fields {
226
226
unsupportedLogEntries : prometheus .NewCounterVec (prometheus.CounterOpts {}, []string {"service" , "level" }),
227
- smtpDelays : prometheus .NewHistogramVec (prometheus.HistogramOpts {}, []string {"stage" }),
228
- smtpStatusDeferred : prometheus .NewCounter (prometheus.CounterOpts {}),
229
- smtpProcesses : prometheus .NewCounterVec (prometheus.CounterOpts {}, []string {"status" }),
230
- smtpDeferredDSN : prometheus .NewCounterVec (prometheus.CounterOpts {}, []string {"dsn" }),
231
- smtpBouncedDSN : prometheus .NewCounterVec (prometheus.CounterOpts {}, []string {"dsn" }),
232
- bounceNonDelivery : prometheus .NewCounter (prometheus.CounterOpts {}),
227
+ smtpDelays : prometheus .NewHistogramVec (prometheus.HistogramOpts {}, []string {"stage" }),
228
+ smtpStatusDeferred : prometheus .NewCounter (prometheus.CounterOpts {}),
229
+ smtpProcesses : prometheus .NewCounterVec (prometheus.CounterOpts {}, []string {"status" }),
230
+ smtpDeferredDSN : prometheus .NewCounterVec (prometheus.CounterOpts {}, []string {"dsn" }),
231
+ smtpBouncedDSN : prometheus .NewCounterVec (prometheus.CounterOpts {}, []string {"dsn" }),
232
+ bounceNonDelivery : prometheus .NewCounter (prometheus.CounterOpts {}),
233
233
},
234
234
},
235
235
{
@@ -249,7 +249,7 @@ func TestPostfixExporter_CollectFromLogline(t *testing.T) {
249
249
args : args {
250
250
line : []string {
251
251
"Feb 14 19:05:25 123-mail postfix/smtpd[1517]: table hash:/etc/postfix/virtual_mailbox_maps(0,lock|fold_fix) has changed -- restarting" ,
252
- "Mar 16 12:28:02 123-mail postfix/smtpd[16268]: fatal: file /etc/postfix/main.cf: parameter default_privs: unknown user name value: nobody" ,
252
+ "Mar 16 12:28:02 123-mail postfix/smtpd[16268]: fatal: file /etc/postfix/main.cf: parameter default_privs: unknown user name value: nobody" ,
253
253
"Mar 16 23:30:44 123-mail postfix/qmgr[29980]: warning: please avoid flushing the whole queue when you have" ,
254
254
"Mar 16 23:30:44 123-mail postfix/qmgr[29980]: warning: lots of deferred mail, that is bad for performance" ,
255
255
},
0 commit comments