Skip to content

Commit

Permalink
merged hostname with domain to handle host split
Browse files Browse the repository at this point in the history
  • Loading branch information
Kritika Kritika authored and Kritika Kritika committed Dec 13, 2023
1 parent a0ecf1b commit e51f73e
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions config/enrichments/17_dns.conf
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,18 @@ filter {
}
}
if [host][hostname] and ![host][hostname][0] and ![host][ip] {
mutate {
add_field => {
"[host][ip]" => "%{[host][hostname]}"
if "." not in [host][hostname] and [host][domain] {
mutate {
add_field => {
"[host][ip]" => "%{[host][hostname]}.%{[host][domain]}"
}
}
}
else {
mutate {
add_field => {
"[host][ip]" => "%{[host][hostname]}"
}
}
}
dns {
Expand Down

0 comments on commit e51f73e

Please sign in to comment.