if your metric_id is unique , and you want the id to be retained then document_id => "%{id}" should be the best option. you can combine it with action create to avoid the document being overwritten if the document_id already exists.
your existing config shows action => "index" . this will overwrite / update the document if the same document_id exists. it shouldn't upload the same entries, unless you have index the document before without specifying an id, which causes Elasticsearch to automatically create an id