At least one thing you need to do is to separate the key levels with square brackets like this example from my Logstash config
if [fields][index_type] == "postfix-maillog" {
So if [prospector.type] == "log" {
should be if [prospector][type] == "log" {