One thing to note. The codec charset
directive is not a "to" operation, it is a "from" operation. In Logstash, the "to" charset is always UTF-8.
Logstash does not have universal charset detection so it needs to know what charset the strings are encoded in to be able to convert them to UTF-8.
When I run your config without the jdbc output I get:
input {
stdin {
codec => plain { charset=>"UTF-8" }
}
}
output {
stdout { codec => rubydebug }
}
result:
{
"@version" => "1",
"host" => "Elastics-MacBook-Pro.local",
"@timestamp" => 2018-04-05T20:50:16.143Z,
"message" => "fühlen"
}
From this SO post you could try locale charmap
to see what the charset for the vm is, or for a more realistic test the exec input.
input {
exec {
command => "locale charmap"
interval => 3600
}
}
output {
stdout { codec => rubydebug }
}