DataDog / datadog-agent

Main repository for Datadog Agent
https://docs.datadoghq.com/
Apache License 2.0
2.87k stars 1.21k forks source link

DD Agent autodiscover not working ? #6643

Open HoussemDellai opened 4 years ago

HoussemDellai commented 4 years ago
$ kubectl exec datadog-vk8b8 -- agent configcheck I get the following output, but it does not including Prometheus. Defaulting container name to agent. === cpu check === === disk check === === docker check === === file_handle check === === io check === === kubelet check === === load check === // other checks... **Describe what happened:** I have deployed Datadog into my AKS cluster using the Helm chart. I expect Autodiscovery feature to be enabled by default as stated in the documentation. Then I deploy a Prometheus pod, the same provided in the docs here: https://docs.datadoghq.com/agent/kubernetes/prometheus/. apiVersion: apps/v1 kind: Deployment metadata: name: prometheus-deployment labels: app: prometheus purpose: example spec: replicas: 2 selector: matchLabels: app: prometheus purpose: example template: metadata: labels: app: prometheus purpose: example annotations: ad.datadoghq.com/prometheus-example.check_names: '["openmetrics"]' ad.datadoghq.com/prometheus-example.init_configs: '[{}]' ad.datadoghq.com/prometheus-example.instances: | [ { "prometheus_url": "http://%%host%%:%%port%%/metrics", "namespace": "documentation_example_kubernetes", "metrics": [ {"promhttp_metric_handler_requests_total": "prometheus.handler.requests.total"}] } ] spec: containers: - name: prometheus-example image: prom/prometheus ports: - containerPort: 9090 --- kind: Service apiVersion: v1 metadata: name: prometheus-example-service spec: selector: app: prometheus purpose: example ports: - name: promui protocol: TCP port: 9090 targetPort: 9090 **Describe what you expected:** I expect to get the metrics from the Prometheus pod as I am using the annotations with autodiscovery. **Steps to reproduce the issue:** The same steps here are not working: https://docs.datadoghq.com/agent/kubernetes/prometheus/ 1) Deploy Datadog into Kubernetes. 2) Deploy the Prometheus yaml. 3) Check in the Datadog dashboard, there is no metrics coming from Prometheus. Am I missing something ?
shaunmcglinchey commented 3 years ago

@HoussemDellai - were you able to get autodiscovery working? I'm also looking at this, trying to establish why my metrics are not being ingested

HoussemDellai commented 3 years ago

I actually didn't tried again since then.

bkrugerp99 commented 3 years ago

I have the same issue myself, but service-based autodiscovery works, pod-based does not. Even the default checks from the cluster agent don't show up in the cluster agent itself. I do run the cluster-agent and the workers separately myself. I even have a ticket open with provided helm values, but so far it's not been useful for a resolution that it's time to start trying to read the source. :/

akshaySinghDH commented 1 year ago

Was anyone able to solve this, I am facing same issue.

ShashwatPK commented 1 year ago

I'm facing the same issue @akshaySinghDH , were you able to solve it?