Skip to content

Instantly share code, notes, and snippets.

@fetep
Created May 2, 2012 19:10
Show Gist options
  • Save fetep/2579375 to your computer and use it in GitHub Desktop.
Save fetep/2579375 to your computer and use it in GitHub Desktop.
conditional @source_host replacement
input {
stdin {
format => "json"
type => "test"
}
}
filter {
grep {
type => "test"
match => ["logsource", "."]
drop => false
add_tag => "has_logsource"
}
mutate {
type => "test"
tags => "has_logsource"
replace => ["@source_host", "%{logsource}"]
}
}
output {
stdout {
debug => true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment