I was looking at this and trying to work in conditional logic on my pipeline.conf output so that if a given field exists, the index with have one values, and otherwise it will default to another value.
I currently have something like this:
output {
elasticsearch {
hosts => [ "<host_name>:<port_number>"]
index => "logstash-%{+YYYY.MM}"
}
}
I've tried a few different things, but keep getting something like:
Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of #, => at line 53, column 11 (byte 758) after output