input { # Sample input over UDP udp { codec => json port => 5000 type => logstash-relay } } output { if [type] == "logstash-relay" { stdout { codec => json } elasticsearch { id => "client_error_relay_service" index => "client_error_relay-%{+YYYY.MM.dd}" hosts => ["128.0.0.1:9200"] # Use the internal IP of your Elasticsearch server # for production } } } filter { if [type] == "logstash-relay" { json { source => "message" } } }