Change logstash index creation format

How do I set the logstash output index name to the client IP where metricbeat is installed?

I just want logstash output index format to have below

Metricbeat-{metricbeat.client.ip}-metricbeat.version-{YYYY.MM.DD}