Update metrics.rb example

Update the example because output doesn't have the message parameter, instead it should use a a codec.
Also update the way how logstash is executed.