# Wazuh App Copyright (C) 2019 Wazuh Inc. (License GPLv2) # Wazuh - Logstash configuration file ## Remote Wazuh Manager - Filebeat input input { beats { port => 5000 # ssl => true # ssl_certificate => "/etc/logstash/logstash.crt" # ssl_key => "/etc/logstash/logstash.key" } } filter { json { source => "message" } } filter { if [data][srcip] { mutate { add_field => [ "@src_ip", "%{[data][srcip]}" ] } } if [data][aws][sourceIPAddress] { mutate { add_field => [ "@src_ip", "%{[data][aws][sourceIPAddress]}" ] } } } filter { geoip { source => "@src_ip" target => "GeoLocation" fields => ["city_name", "country_name", "region_name", "location"] } date { match => ["timestamp", "ISO8601"] target => "@timestamp" } mutate { remove_field => [ "beat", "input_type", "tags", "count", "@version", "log", "offset", "type", "@src_ip", "host"] } } filter { # Workarounds for vulnerability-detector if "vulnerability-detector" in [rule][groups] { # Drop vulnerability-detector events from Manager if [agent][id] == "000"{ drop { } } # if exists, remove data.vulnerability.published field due to conflicts if [data][vulnerability][published] { mutate { remove_field => [ "[data][vulnerability][published]" ] } } } } output { elasticsearch { hosts => ["elasticsearch:9200"] index => "wazuh-alerts-3.x-%{+YYYY.MM.dd}" } }