Hello,
I've got a configuration that seems to work fine
filter {
if [program] == "named" {
grok {
break_on_match => true
patterns_dir => "/etc/logstash/conf.d/patterns"
match => [ "message", "%{BIND9}" ]
tag_on_failure => ["named_parsing_failed"]
remove_tag => ["_grokparsefailure"]
add_tag => ["DNS"]
}
}
}
---
BIND9 client (%{IPV4:dns_client_ip})#(%{NONNEGINT:dns_uuid})?.*query: (%{HOSTNAME:dns_dest}) (%{WORD:dns_type}) (%{WORD:dns_record})?.*\((%{IPV4:dns_server})\)
But ! retrieve the field dns_dest = play.google.com and I would like to isolate the domain google.com
I'd prefer not to touch the grok pattern and keep dns_dest, and using it thereafter to extract the domain.
How should I do that ?
Thank you