grafana-redis-datasource icon indicating copy to clipboard operation
grafana-redis-datasource copied to clipboard

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

Open hyh555 opened this issue 5 years ago • 6 comments

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。

hyh555 avatar Sep 05 '20 13:09 hyh555

@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 avatar Sep 05 '20 15:09 mikhail-vl

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

mikhail-vl avatar Sep 28 '20 04:09 mikhail-vl

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

EraYaN avatar Jul 28 '22 16:07 EraYaN

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

mikhail-vl avatar Jul 28 '22 18:07 mikhail-vl

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.

w1mm3r avatar Mar 09 '23 12:03 w1mm3r

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

mikhail-vl avatar Mar 09 '23 19:03 mikhail-vl