# Wazuh - Logstash configuration file ## Remote Wazuh Manager - Filebeat input input { beats { port => 5000 codec => "json_lines" # ssl => true # ssl_certificate => "/etc/logstash/logstash.crt" # ssl_key => "/etc/logstash/logstash.key" } } 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 => [ "timestamp", "beat", "input_type", "tags", "count", "@version", "log", "offset", "type", "@src_ip", "host"] } } output { elasticsearch { hosts => ["localhost:9200"] index => "wazuh-alerts-3.x-%{+YYYY.MM.dd}" document_type => "wazuh" } }