Skip to content

Instantly share code, notes, and snippets.

@mrlesmithjr
Created June 25, 2014 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrlesmithjr/5418614c89ae8c96da0f to your computer and use it in GitHub Desktop.
Save mrlesmithjr/5418614c89ae8c96da0f to your computer and use it in GitHub Desktop.
# Add src_ip if not already found
filter {
if [type] == "syslog" {
if [src_ip] == "" {
mutate {
add_field => [ "src_ip", "%{syslog_hostname}" ]
}
dns {
resolve => [ "src_ip" ]
action => "replace"
}
}
}
}
@untergeek
Copy link

more like:

if ![src_ip] {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment