Yes, we include an index template that is compatible with ES 2.x.
There are some minor changes in the configuration files. I recommend you see the upgrade guide. There will be some minor config file changes and you will need to install and updated index template.
https://www.elastic.co/guide/en/beats/libbeat/5.0/_upgrading_from_1_x_to_5_x.html