Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redis receiver should allow to use a username in addition to password #33707

Closed
nsteinmetz opened this issue Jun 21, 2024 · 4 comments · Fixed by #33710
Closed

redis receiver should allow to use a username in addition to password #33707

nsteinmetz opened this issue Jun 21, 2024 · 4 comments · Fixed by #33710
Labels
documentation Improvements or additions to documentation receiver/redis Redis related issues

Comments

@nsteinmetz
Copy link

nsteinmetz commented Jun 21, 2024

Component(s)

receiver/redis

What happened?

Description

With Redis 7, a new ACL mechanism was deployed and there is no longer a single user (ie requirepass property).

Thus, it would be nice to pass a username and a password to redis when you have a dedicated user for monitoring instead of default one.

Steps to Reproduce

Set ACL in redis.conf

user default on > some_password ~* +@all
user monitoring_user on > monitoring_password ~* +@admin +@dangerous

Expected Result

receivers:
    redis:
      endpoint: localhost:6379
      collection_interval: 10s
      username: monitoring_user
      password: monitoring_password

Actual Result

Only default password works to authenticate to redis

receivers:
    redis:
      endpoint: localhost:6379
      collection_interval: 10s
      password: some_password

Collector version

0.103.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

@nsteinmetz nsteinmetz added bug Something isn't working needs triage New item requiring triage labels Jun 21, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the receiver/redis Redis related issues label Jun 21, 2024
@rogercoll
Copy link
Contributor

The current redis receiver has a username configuration option: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/redisreceiver/config.go#L29

Is this what you were referring to? Or an issue with the actual username configuration?

In the OpenTelemetry demo we are using the default ACL for Valkey which only requires a username: https://github.com/open-telemetry/opentelemetry-demo/blob/main/src/otelcollector/otelcol-config.yml#L18

@crobert-1
Copy link
Member

Adding the documentation label as the config option should be in the README

@crobert-1 crobert-1 added the documentation Improvements or additions to documentation label Jun 21, 2024
@nsteinmetz
Copy link
Author

nsteinmetz commented Jun 21, 2024

@rogercoll my bad, I only refered to the documentation, which does not mention it

I can confirm it works once username is added.

So only a documentation issue.

@crobert-1 crobert-1 removed bug Something isn't working needs triage New item requiring triage labels Jun 21, 2024
martin-majlis-s1 pushed a commit to scalyr/opentelemetry-collector-contrib that referenced this issue Jun 24, 2024
…pen-telemetry#33710)

A recent issued brought up that the `username` config option is
available, but not documented in the README. The `password` option is
described in the README, but doesn't include information relevant for
Redis >= 6.0. This adds information on both config options.

Fixes open-telemetry#33707
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation receiver/redis Redis related issues
Projects
None yet
3 participants