Skip to content

Commit

Permalink
minor fix for for cisagov#354, set host.name correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
mmguero committed Jan 7, 2025
1 parent 83d7485 commit 0f69adb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions logstash/pipelines/beats/11_beats_logs.conf
Original file line number Diff line number Diff line change
Expand Up @@ -840,10 +840,9 @@ filter {
replace => { "[event][module]" => "syslog" } }

# store the originating host name as host.name as it's probably what people will want to search by
if ([hostname]) {
mutate { id => "mutate_syslog_direct_add_ecs_hostname"
add_field => { "[log][syslog][hostname]" => "%{[hostname]}" } }
}
if ([log][syslog][hostname]) { mutate { id => "mutate_syslog_direct_replace_hostname"
replace => { "[host][name]" => "%{[log][syslog][hostname]}" }
remove_field => [ "[hostname]" ] } }

if (![event][hash]) {
fingerprint {
Expand Down

0 comments on commit 0f69adb

Please sign in to comment.