question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[redisdb] checks autodiscovery fail

See original GitHub issue

Summary Datadog agent does not auto discover the redisdb checks when doing auto discovery by pod annotation with instance config password: "%%env_REDIS_PASSWORD%%"

Steps to reproduce the issue: Kubernetes Cluster version: 1.16.9 Datadog agent Chart version: 2.0.4

  1. Install the datadog daemonset using this helm chart https://github.com/helm/charts/tree/master/stable/datadog
  2. Install redis by using this helm chart https://github.com/bitnami/charts/tree/master/bitnami/redis and supply the below datadog discovery annotations through helm value files
master.podAnnotations: {
    ad.datadoghq.com/redis.check_names: '["redisdb"]'
    ad.datadoghq.com/redis.init_configs: '[{}]'
    ad.datadoghq.com/redis.instances: |
      [
        {
          "host": "%%host%%",
          "port":"6379",
          "password":"%%env_REDIS_PASSWORD%%"
        }
      ]
 }
  1. use kubectx exec -it <POD_NAME> sh to execute into the shell of the datadog agent on the same node as the redis pod
  2. execute agent status command

Actual Result: I cannot see and redis check info display on the agent status

Expected: If the auto discover successful I must be able to see that the agent discover the redis pod Screen Shot 2563-06-23 at 23 20 41

Additional information:

  1. Although i also try to use agent configcheck command but still could not see any information regard to the redis check

  2. However, when i try to hard code the redis password to the annotation for example:

master.podAnnotations: {
    ad.datadoghq.com/redis.check_names: '["redisdb"]'
    ad.datadoghq.com/redis.init_configs: '[{}]'
    ad.datadoghq.com/redis.instances: |
      [
        {
          "host": "%%host%%",
          "port":"6379",
          "password":"123456"
        }
      ]
 }

Suddenly the auto discovery of the redis check work and the information of the check/discovery appear when I execute agent status and agent cofigcheck

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
vboulineaucommented, Jun 25, 2020

@chan43999 That’s not possible (except if you pass REDIS_PASSWORD in plain text!), secret in PODs are (hopefully) not expanded when querying the Kubelet or APIServer for the POD object. Instead we will get:

                            {
                                "name": "REDIS_PASSWORD",
                                "valueFrom": {
                                    "secretKeyRef": {
                                        "key": "password",
                                        "name": "redis-password"
                                    }
                                }
                            },

Which won’t allow the agent to fetch the value

1reaction
chan43999commented, Jun 26, 2020

@ahmed-mez @vboulineau Got it. Thank you for your explanation and suggestion. The secret management feature look good to me. I will go ahead a try it. Cheers!!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

[redisdb] checks autodiscovery fail · Issue #520 - GitHub
following this page , I enabled auto discovery on Datadog then I installed redis via helm chart ... [redisdb] checks autodiscovery fail #520....
Read more >
Autodiscovery Troubleshooting - Datadog Docs
Autodiscovery Troubleshooting. To start troubleshooting the Docker Agent Autodiscovery, run the configcheck init script command: docker exec -it ...
Read more >
Redis cluster specification
Before returning an error to the caller when a slot is found to be unassigned, the client should try to fetch the slots...
Read more >
0 - Stack Overflow
In my Kubernetes cluster I have launched the datadog agent via helm charts. Ultimately in my trace-agent I want to copy some .yaml...
Read more >
Datadog Autodiscovery on Kubernetes - YouTube
Orchestration platforms like Docker Swarm, Kubernetes, and Amazon ECS make running containerized services easier and more resilient by ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found