File tree Expand file tree Collapse file tree 4 files changed +26
-0
lines changed
Expand file tree Collapse file tree 4 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,13 @@ filter {
175175 tag_on_failure => [ "_grok_postfix_script_nomatch" ]
176176 add_tag => [ "_grok_postfix_success" ]
177177 }
178+ } else if [program] =~ /^postfix.*\/verify$/ {
179+ grok {
180+ patterns_dir => "/etc/logstash/patterns.d"
181+ match => [ "message", "^%{POSTFIX_VERIFY}$" ]
182+ tag_on_failure => [ "_grok_postfix_verify_nomatch" ]
183+ add_tag => [ "_grok_postfix_success" ]
184+ }
178185 } else if [program] =~ /^postfix.*/ {
179186 mutate {
180187 add_tag => [ "_grok_postfix_program_nomatch" ]
@@ -270,6 +277,8 @@ filter {
270277 "postfix_size", "integer",
271278 "postfix_status_code", "integer",
272279 "postfix_termination_signal", "integer",
280+ "postfix_verify_cache_dropped", "integer",
281+ "postfix_verify_cache_retained", "integer",
273282
274283 # list of float fields
275284 "postfix_delay", "float",
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ POSTFIX_TIME_UNIT %{NUMBER}[smhd]
2323POSTFIX_KEYVALUE_DATA [\w-]+=[^;]*
2424POSTFIX_KEYVALUE %{POSTFIX_QUEUEID:postfix_queueid}: %{POSTFIX_KEYVALUE_DATA:postfix_keyvalue_data}
2525POSTFIX_WARNING_LEVEL (warning|fatal|info)
26+ POSTFIX_VERIFY_CLEANUP_TYPE (full|partial)
2627
2728POSTFIX_TLSCONN (Anonymous|Trusted|Untrusted|Verified) TLS connection established (to %{POSTFIX_RELAY_INFO}|from %{POSTFIX_CLIENT_INFO}): %{DATA:postfix_tls_version} with cipher %{DATA:postfix_tls_cipher} \(%{DATA:postfix_tls_cipher_size} bits\)
2829POSTFIX_TLSVERIFICATION certificate verification failed for %{POSTFIX_RELAY_INFO}: %{GREEDYDATA:postfix_tls_error}
@@ -117,6 +118,9 @@ POSTFIX_SCACHE_LOOKUPS statistics: (address|domain) lookup hits=%{INT:postfix_sc
117118POSTFIX_SCACHE_SIMULTANEOUS statistics: max simultaneous domains=%{INT:postfix_scache_domains} addresses=%{INT:postfix_scache_addresses} connection=%{INT:postfix_scache_connection}
118119POSTFIX_SCACHE_TIMESTAMP statistics: start interval %{SYSLOGTIMESTAMP:postfix_scache_timestamp}
119120
121+ # verify patterns
122+ POSTFIX_VERIFY_CACHE cache %{DATA} %{POSTFIX_VERIFY_CLEANUP_TYPE:postfix_verify_cleanup_type} cleanup: retained=%{INT:postfix_verify_cache_retained} dropped=%{INT:postfix_verify_cache_dropped} entries
123+
120124# aggregate all patterns
121125POSTFIX_SMTPD %{POSTFIX_SMTPD_CONNECT}|%{POSTFIX_SMTPD_DISCONNECT}|%{POSTFIX_SMTPD_LOSTCONN}|%{POSTFIX_SMTPD_NOQUEUE}|%{POSTFIX_SMTPD_PIPELINING}|%{POSTFIX_TLSCONN}|%{POSTFIX_WARNING}|%{POSTFIX_SMTPD_PROXY}|%{POSTFIX_KEYVALUE}
122126POSTFIX_CLEANUP %{POSTFIX_CLEANUP_MESSAGEID}|%{POSTFIX_CLEANUP_MILTER}|%{POSTFIX_CLEANUP_PREPEND}|%{POSTFIX_WARNING}|%{POSTFIX_KEYVALUE}
@@ -143,3 +147,4 @@ POSTFIX_ERROR %{POSTFIX_ERROR_ANY}
143147POSTFIX_POSTSUPER %{POSTFIX_POSTSUPER_ACTION}|%{POSTFIX_POSTSUPER_SUMMARY}
144148POSTFIX_POSTMAP %{POSTFIX_WARNING}
145149POSTFIX_SCRIPT %{POSTFIX_WARNING}
150+ POSTFIX_VERIFY %{POSTFIX_VERIFY_CACHE}
Original file line number Diff line number Diff line change 1+ pattern : ^%{POSTFIX_VERIFY}$
2+ data : " cache lmdb:/var/lib/postfix/verify_cache full cleanup: retained=724 dropped=6 entries"
3+ results :
4+ postfix_verify_cleanup_type : full
5+ postfix_verify_cache_retained : 724
6+ postfix_verify_cache_dropped : 6
Original file line number Diff line number Diff line change 1+ pattern : ^%{POSTFIX_VERIFY}$
2+ data : " cache ??????????????????????????????????? partial cleanup: retained=1 dropped=0 entries"
3+ results :
4+ postfix_verify_cleanup_type : partial
5+ postfix_verify_cache_retained : 1
6+ postfix_verify_cache_dropped : 0
You can’t perform that action at this time.
0 commit comments