0

I have a go gRPC Service running with middleware that counts handled requests. As I am developing I only have one replica of the service up, but tried scaling it.

At that point I noticed grafana would not scrape the metrics endpoint from multiple replicas. Is there anything I am missing? My scrape config is pretty simple:

        - job_name: my-service
          honor_labels: true
          metrics_path: /metrics
          scheme: http
          static_configs:
            - targets: ['my-service.default.svc.cluster.local:8080']
Andy Troschke
  • 441
  • 1
  • 5
  • 13
  • Shouldn't you target the resource (like a `Deployment`) with your scraping rather than a `Service` that would be a "front" to it? – Dawid Kruk May 07 '23 at 14:08
  • I am pretty new to Grafana and Kubernetes as a whole, but trying to learn. I am unsure how I would target the deployment, mind helping me out there? – Andy Troschke May 07 '23 at 14:50
  • Hey, what I told you was an idea. Haven't tested that. I believe you will find your answer on Google with right query. When I find some time, I'll respond if you haven't found an answer yet. – Dawid Kruk May 10 '23 at 06:10

0 Answers0