How to do password variable substitution in beats install

Hi,
I would like to do password variable substitution in the beats configuration, something like this: ${beats_password}, should I set the password value in elasticsearch keystore for that? How the value get passed to beats connection?

Thanks!

Filebeat has its own keystore. You can set the password there. See more here: https://www.elastic.co/guide/en/beats/filebeat/current/keystore.html