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

**URL:** <https://discuss.elastic.co/t/redis-module-connection-by-using-different-user-rather-than-redis-default-user/323410>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [January 18, 2023, 12:35pm UTC](https://discuss.elastic.co/t/redis-module-connection-by-using-different-user-rather-than-redis-default-user/323410 "2023-01-18T12:35:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gopal\_Nipane](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gopal_nipane/32/116082_2.png) [@Gopal\_Nipane](https://discuss.elastic.co/u/Gopal_Nipane)\
**Post date:** [January 18, 2023, 12:35pm UTC](https://discuss.elastic.co/t/redis-module-connection-by-using-different-user-rather-than-redis-default-user/323410/1 "2023-01-18T12:35:04Z")

</div>

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:

```auto
 username: my_username
 password: my_password

```

But got unlucky.

Tips and suggestion will appreciated!

---

<div class="post-metadata">

**Author:** ![Wave](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wave/32/117242_2.png) [@Wave](https://discuss.elastic.co/u/Wave)\
**Post date:** [February 8, 2023, 8:06pm UTC](https://discuss.elastic.co/t/redis-module-connection-by-using-different-user-rather-than-redis-default-user/323410/2 "2023-02-08T20:06:16Z")

</div>

Not 100% sure, but think only the password is configurable. Try with just the password. [password configuration in metricbeat](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-module-redis.html). 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).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 8, 2023, 10:06pm UTC](https://discuss.elastic.co/t/redis-module-connection-by-using-different-user-rather-than-redis-default-user/323410/3 "2023-03-08T22:06:50Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
