input { udp {
port => 50514
type => syslog} }
filter {
if [type] == "syslog" {
grok {
match => { "message" => "%{SYSLOGBASE} : %{GREEDYDATA:syslog_message}" }
}
syslog_pri { }
}
}
output {
elasticsearch { hosts => ["ИМЯ ХОСТА:9200"] }
stdout { codec => rubydebug }
}
iptables -t nat -I PREROUTING -p udp --dport 50514 -j REDIRECT --to-port 514