Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions 50-filter-postfix.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,154 +3,154 @@ filter {
if [program] =~ /^postfix.*\/anvil$/ {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => [ "message", "%{POSTFIX_ANVIL}" ]
match => [ "message", "^%{POSTFIX_ANVIL}$" ]
tag_on_failure => [ "_grok_postfix_anvil_nomatch" ]
add_tag => [ "_grok_postfix_success" ]
}
} else if [program] =~ /^postfix.*\/bounce$/ {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => [ "message", "%{POSTFIX_BOUNCE}" ]
match => [ "message", "^%{POSTFIX_BOUNCE}$" ]
tag_on_failure => [ "_grok_postfix_bounce_nomatch" ]
add_tag => [ "_grok_postfix_success" ]
}
} else if [program] =~ /^postfix.*\/cleanup$/ {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => [ "message", "%{POSTFIX_CLEANUP}" ]
match => [ "message", "^%{POSTFIX_CLEANUP}$" ]
tag_on_failure => [ "_grok_postfix_cleanup_nomatch" ]
add_tag => [ "_grok_postfix_success" ]
}
} else if [program] =~ /^postfix.*\/dnsblog$/ {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => [ "message", "%{POSTFIX_DNSBLOG}" ]
match => [ "message", "^%{POSTFIX_DNSBLOG}$" ]
tag_on_failure => [ "_grok_postfix_dnsblog_nomatch" ]
add_tag => [ "_grok_postfix_success" ]
}
} else if [program] =~ /^postfix.*\/error$/ {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => [ "message", "%{POSTFIX_ERROR}" ]
match => [ "message", "^%{POSTFIX_ERROR}$" ]
tag_on_failure => [ "_grok_postfix_error_nomatch" ]
add_tag => [ "_grok_postfix_success" ]
}
} else if [program] =~ /^postfix.*\/local$/ {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => [ "message", "%{POSTFIX_LOCAL}" ]
match => [ "message", "^%{POSTFIX_LOCAL}$" ]
tag_on_failure => [ "_grok_postfix_local_nomatch" ]
add_tag => [ "_grok_postfix_success" ]
}
} else if [program] =~ /^postfix.*\/master$/ {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => [ "message", "%{POSTFIX_MASTER}" ]
match => [ "message", "^%{POSTFIX_MASTER}$" ]
tag_on_failure => [ "_grok_postfix_master_nomatch" ]
add_tag => [ "_grok_postfix_success" ]
}
} else if [program] =~ /^postfix.*\/pickup$/ {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => [ "message", "%{POSTFIX_PICKUP}" ]
match => [ "message", "^%{POSTFIX_PICKUP}$" ]
tag_on_failure => [ "_grok_postfix_pickup_nomatch" ]
add_tag => [ "_grok_postfix_success" ]
}
} else if [program] =~ /^postfix.*\/pipe$/ {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => [ "message", "%{POSTFIX_PIPE}" ]
match => [ "message", "^%{POSTFIX_PIPE}$" ]
tag_on_failure => [ "_grok_postfix_pipe_nomatch" ]
add_tag => [ "_grok_postfix_success" ]
}
} else if [program] =~ /^postfix.*\/postdrop$/ {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => [ "message", "%{POSTFIX_POSTDROP}" ]
match => [ "message", "^%{POSTFIX_POSTDROP}$" ]
tag_on_failure => [ "_grok_postfix_postdrop_nomatch" ]
add_tag => [ "_grok_postfix_success" ]
}
} else if [program] =~ /^postfix.*\/postscreen$/ {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => [ "message", "%{POSTFIX_POSTSCREEN}" ]
match => [ "message", "^%{POSTFIX_POSTSCREEN}$" ]
tag_on_failure => [ "_grok_postfix_postscreen_nomatch" ]
add_tag => [ "_grok_postfix_success" ]
}
} else if [program] =~ /^postfix.*\/qmgr$/ {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => [ "message", "%{POSTFIX_QMGR}" ]
match => [ "message", "^%{POSTFIX_QMGR}$" ]
tag_on_failure => [ "_grok_postfix_qmgr_nomatch" ]
add_tag => [ "_grok_postfix_success" ]
}
} else if [program] =~ /^postfix.*\/scache$/ {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => [ "message", "%{POSTFIX_SCACHE}" ]
match => [ "message", "^%{POSTFIX_SCACHE}$" ]
tag_on_failure => [ "_grok_postfix_scache_nomatch" ]
add_tag => [ "_grok_postfix_success" ]
}
} else if [program] =~ /^postfix.*\/sendmail$/ {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => [ "message", "%{POSTFIX_SENDMAIL}" ]
match => [ "message", "^%{POSTFIX_SENDMAIL}$" ]
tag_on_failure => [ "_grok_postfix_sendmail_nomatch" ]
add_tag => [ "_grok_postfix_success" ]
}
} else if [program] =~ /^postfix.*\/smtp$/ {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => [ "message", "%{POSTFIX_SMTP}" ]
match => [ "message", "^%{POSTFIX_SMTP}$" ]
tag_on_failure => [ "_grok_postfix_smtp_nomatch" ]
add_tag => [ "_grok_postfix_success" ]
}
} else if [program] =~ /^postfix.*\/lmtp$/ {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => [ "message", "%{POSTFIX_LMTP}" ]
match => [ "message", "^%{POSTFIX_LMTP}$" ]
tag_on_failure => [ "_grok_postfix_lmtp_nomatch" ]
add_tag => [ "_grok_postfix_success" ]
}
} else if [program] =~ /^postfix.*\/smtpd$/ {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => [ "message", "%{POSTFIX_SMTPD}" ]
match => [ "message", "^%{POSTFIX_SMTPD}$" ]
tag_on_failure => [ "_grok_postfix_smtpd_nomatch" ]
add_tag => [ "_grok_postfix_success" ]
}
} else if [program] =~ /^postfix.*\/tlsmgr$/ {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => [ "message", "%{POSTFIX_TLSMGR}" ]
match => [ "message", "^%{POSTFIX_TLSMGR}$" ]
tag_on_failure => [ "_grok_postfix_tlsmgr_nomatch" ]
add_tag => [ "_grok_postfix_success" ]
}
} else if [program] =~ /^postfix.*\/tlsproxy$/ {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => [ "message", "%{POSTFIX_TLSPROXY}" ]
match => [ "message", "^%{POSTFIX_TLSPROXY}$" ]
tag_on_failure => [ "_grok_postfix_tlsproxy_nomatch" ]
add_tag => [ "_grok_postfix_success" ]
}
} else if [program] =~ /^postfix.*\/trivial-rewrite$/ {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => [ "message", "%{POSTFIX_TRIVIAL_REWRITE}" ]
match => [ "message", "^%{POSTFIX_TRIVIAL_REWRITE}$" ]
tag_on_failure => [ "_grok_postfix_trivial_rewrite_nomatch" ]
add_tag => [ "_grok_postfix_success" ]
}
} else if [program] =~ /^postfix.*\/discard$/ {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => [ "message", "%{POSTFIX_DISCARD}" ]
match => [ "message", "^%{POSTFIX_DISCARD}$" ]
tag_on_failure => [ "_grok_postfix_discard_nomatch" ]
add_tag => [ "_grok_postfix_success" ]
}
} else if [program] =~ /^postfix.*\/virtual$/ {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => [ "message", "%{POSTFIX_VIRTUAL}" ]
match => [ "message", "^%{POSTFIX_VIRTUAL}$" ]
tag_on_failure => [ "_grok_postfix_virtual_nomatch" ]
add_tag => [ "_grok_postfix_success" ]
}
Expand All @@ -173,23 +173,23 @@ filter {
if [postfix_client] {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => ["postfix_client", "%{POSTFIX_CLIENT_INFO}"]
match => ["postfix_client", "^%{POSTFIX_CLIENT_INFO}$"]
tag_on_failure => [ "_grok_kv_postfix_client_nomatch" ]
remove_field => [ "postfix_client" ]
}
}
if [postfix_relay] {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => ["postfix_relay", "%{POSTFIX_RELAY_INFO}"]
match => ["postfix_relay", "^%{POSTFIX_RELAY_INFO}$"]
tag_on_failure => [ "_grok_kv_postfix_relay_nomatch" ]
remove_field => [ "postfix_relay" ]
}
}
if [postfix_delays] {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => ["postfix_delays", "%{POSTFIX_DELAYS}"]
match => ["postfix_delays", "^%{POSTFIX_DELAYS}$"]
tag_on_failure => [ "_grok_kv_postfix_delays_nomatch" ]
remove_field => [ "postfix_delays" ]
}
Expand Down