how to test logstash config

How do test logstash config?

$ cat test.config
input {
stdin { }
}
output {
stdout {
codec => rubydebug }
}
filter {
date {
match => [“message”, “dd/MM/YYYY HH.mm.ss”]
}
}

$ echo ’12/28/2016 10.50.11′ | /opt/logstash/bin/logstash -f test.config
{
“message” => “12/28/2016 10.50.11”,
“@version” => “1”,
“@timestamp” => “2016-12-28T10:50:11.000Z”,
“host” => “mydearhost”
}

Advertisements