Logstash best practices for multiple sources

Use conditionals in the filter section to set the index name and then use a sprintf reference in the Elasticsearch output. There is an example here. Note that the index option is ignored if ILM is enabled, which is on by default in recent versions.