Redis Module Connection By using Different User rather than redis default user

Can we mention username in metricbeat redis module ie. /etc/metricbeat/modules.d/redis.yml?

I tried two approches to add username

  1. in module.hosts field:
    hosts: ["redis://username:password@localhost:6379"]

  2. in module.username field:

 username: my_username
 password: my_password

But got unlucky.

Tips and suggestion will appreciated!

Not 100% sure, but think only the password is configurable. Try with just the password. password configuration in metricbeat. Also, assuming you aren't asking how do I get metricbeat data into redis, which would be a different solution (try /etc/metricbeat/metricbeat.yml instead).