RedisGrafana / grafana-redis-datasource

Redis Data Source for @Grafana allows connecting to any @Redis database On-Premises and in the Cloud.
https://redisgrafana.github.io
Apache License 2.0
150 stars 39 forks source link

Special configured on the Redis databases doesn't work in Sentinel mode #62

Open hyh555 opened 4 years ago

hyh555 commented 4 years ago

I use /db-number or ?db=db-number in the Data Source URL to specify the database number as defined in the Schema. but It doesn't work in Sentinel mode。

mikhail-vl commented 4 years ago

@hyh555 Thank you for opening the issue.

Could you please provide the screenshot with your data source configuration and clarify what is not working to investigate.

mikhail-vl commented 4 years ago

@hyh555 We did not hear back from you regarding this issue. Please provide more details if you still require assistance.

EraYaN commented 2 years ago

This is still an issue, it seems like it tries to send the SELECT command to the sentinel

So you get tons of these:

lvl=eror msg="Query data error" error="failed to query data: Failed to query data: rpc error: code = Unknown desc = ERR unknown command `SELECT`, with args beginning with: `1`, "

With the config (as an example)

    - orgId: 1
      version: 2
      name: Redis
      type: redis-datasource
      access: proxy
      url: redis://redis.default.svc.cluster.local:26379?db=1
      jsonData:
        acl: false
        client: sentinel
        sentinelName: main
      secureJsonData:
        password: $REDIS_PASSWORD
        sentinelPassword: $REDIS_PASSWORD
mikhail-vl commented 2 years ago

@EraYaN I will reopen the issue for the Redis team to follow up.

w1mm3r commented 1 year ago

This is still an issue, it seems like it tries to send the SELECT command to the sentinel

So you get tons of these:

lvl=eror msg="Query data error" error="failed to query data: Failed to query data: rpc error: code = Unknown desc = ERR unknown command `SELECT`, with args beginning with: `1`, "

With the config (as an example)

    - orgId: 1
      version: 2
      name: Redis
      type: redis-datasource
      access: proxy
      url: redis://redis.default.svc.cluster.local:26379?db=1
      jsonData:
        acl: false
        client: sentinel
        sentinelName: main
      secureJsonData:
        password: $REDIS_PASSWORD
        sentinelPassword: $REDIS_PASSWORD

@mikhail-vl secureJsonData: password: sentinelPassword: is not described in the provisioning documentation for sentinel. I had to dig this issue up to find it.

mikhail-vl commented 1 year ago

@w1mm3r I am glad it worked for you. Documentation is outdated.