Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revisit default alloy scrape configuration #3523

Open
chancez opened this issue Aug 27, 2024 · 0 comments
Open

Revisit default alloy scrape configuration #3523

chancez opened this issue Aug 27, 2024 · 0 comments

Comments

@chancez
Copy link

chancez commented Aug 27, 2024

Describe the bug

I'm trying to follow the getting started guide here: https://grafana.com/docs/pyroscope/latest/deploy-kubernetes/helm/

However I'm finding it quite challenging to actually get Alloy to scrape Grafana itself.

There's a few issues in the docs, but I've managed to work around this. The main one being the annotations being used are pyroscope.grafana.com but the default config is expecting profiles.grafana.com along with the profile type being specified. However, even after fixing the pod annotations, it's still not working.

I believe the issue is because of the following line that's added to the Alloy scrape config: https://github.com/grafana/pyroscope/blob/main/operations/pyroscope/helm/pyroscope/templates/configmap-alloy.yaml#L86-L90

It seems to be the case that the Alloy config is expecting a container port to be exposed that matches the port configured in the scrape annotations. The problem is, I don't see a way to configure additional ports ion the Grafana pod via the Grafana helm chart: https://github.com/grafana/helm-charts/blob/f2ee54ada5fc925f224dc38986b28c237adaeaa5/charts/grafana/templates/_pod.tpl#L1012-L1021

To Reproduce

Steps to reproduce the behavior:

  1. Follow the steps in https://grafana.com/docs/pyroscope/latest/deploy-kubernetes/helm/
  2. Notice Grafana is not being scraped.

Expected behavior

Grafana profiles can be scraped.

Environment

  • Infrastructure:Kubernetes
  • Deployment tool: helm

Additional details

I think it's a pretty common occurance the pods do not define the profiling ports in the ports section of their containers. It's often overlooked when thinking about the ports a container exposes, especially since profiling is optional. It probably doesn't make sense to rely on the container ports defined on the pod, and to simply trust the annotation is referencing a port that is actually listening. This is how it worked for Phlare, and it makes things a lot simpler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant