Skip to content

Instantly share code, notes, and snippets.

@mrlesmithjr
Last active July 31, 2021 00:44
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mrlesmithjr/eb17fb9e3903fb8231d9bd57dd653769 to your computer and use it in GitHub Desktop.
Save mrlesmithjr/eb17fb9e3903fb8231d9bd57dd653769 to your computer and use it in GitHub Desktop.
filter {
if [type] == "syslog" {
dns {
reverse => [ "host" ]
action => "replace"
}
}
if "ESXi" in [syslog_host_id] {
mutate {
add_tag => [ "ESXi" ]
}
}
if "FW" in [syslog_host_id] {
mutate {
add_tag => [ "FW" ]
}
}
if "NSX" in [syslog_host_id] {
mutate {
add_tag => [ "NSX" ]
}
}
}
filter {
if "ESXi" in [tags] {
grok {
match => [
"message", "blah blah ESXi message pattern(s)"
]
}
}
if "FW" in [tags] {
grok {
match => [
"message", "blah blah FW message pattern(s)"
]
}
}
if "NSX" in [tags] {
grok {
match => [
"message", "blah blah NSX message pattern(s)"
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment