-
Notifications
You must be signed in to change notification settings - Fork 618
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
fix(docs): Make sure helm Grafana example works as expected. #3753
fix(docs): Make sure helm Grafana example works as expected. #3753
Conversation
The problem with the grafana helm is that we don't have the profiling port exposed as part of the containerPorts of the container. So I had to reuse/abuse the gossip-tcp port in order to get it to be scraped. It also was using the wrong annotation of "pyroscope.grafana.com" instead of "profiles.grafana.com". Fixes grafana#3523
Hello @simonswine!
Please, if the current pull request addresses a bug fix, label it with the |
1 similar comment
Hello @simonswine!
Please, if the current pull request addresses a bug fix, label it with the |
This PR must be merged before a backport PR will be created. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
--set-string 'podAnnotations.profiles\.grafana\.com/memory\.scrape=true' \ | ||
--set-string 'podAnnotations.profiles\.grafana\.com/memory\.port=9094' \ | ||
--set-string 'podAnnotations.profiles\.grafana\.com/goroutine\.scrape=true' \ | ||
--set-string 'podAnnotations.profiles\.grafana\.com/goroutine\.port=9094' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Instead of reusing the gossip-tcp port, do you think leveraging extraExposePorts
from Grafana helm chart would work to properly expose the profiling port? I didn't try, but I believe it could be added via Helm command as:
--set extraExposePorts[0].name=profiling,extraExposePorts[0].port=6060,extraExposePorts[0].targetPort=6060
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am afraid that won't do it. extraExposePorts works on service level, we would need it on the container around here: https://github.com/grafana/helm-charts/blob/897c25093da0572716a7cd441e8d3c3dba064b98/charts/grafana/templates/_pod.tpl#L1081
I am planning of submitting something to that chart repo, but that will be a while until it comes through...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There we go grafana/helm-charts#3472
In order to enable profiling using Grafana Alloy and Grafana Pyroscope currently you would need to abuse another container port or insert a dummy container to facitilitate profile collection. This is because a containerPort is matched with the annotations to enable profiling. As a workaround I am "abusing" the port :9094, as for the example I am working on it is unused. This change will make it possible to coexist with gossip-tcp and you would be able to enable profiling like this: ``` helm upgrade -n pyroscope-test --install grafana grafana/grafana \ --set env.GF_DIAGNOSTICS_PROFILING_ENABLED=true \ --set env.GF_DIAGNOSTICS_PROFILING_ADDR=0.0.0.0 \ --set env.GF_DIAGNOSTICS_PROFILING_PORT=6060 \ --set-string 'podAnnotations.profiles\.grafana\.com/cpu\.scrape=true' \ --set-string 'podAnnotations.profiles\.grafana\.com/cpu\.port=6060' \ --set-string 'podAnnotations.profiles\.grafana\.com/memory\.scrape=true' \ --set-string 'podAnnotations.profiles\.grafana\.com/memory\.port=6060' \ --set-string 'podAnnotations.profiles\.grafana\.com/goroutine\.scrape=true' \ --set-string 'podAnnotations.profiles\.grafana\.com/goroutine\.port=6060' ``` This is realted to grafana/pyroscope#3753 Signed-off-by: Christian Simon <[email protected]>
In order to enable profiling using Grafana Alloy and Grafana Pyroscope currently you would need to abuse another container port or insert a dummy container to facitilitate profile collection. This is because a containerPort is matched with the annotations to enable profiling. As a workaround I am "abusing" the port :9094, as for the example I am working on it is unused. This change will make it possible to coexist with gossip-tcp and you would be able to enable profiling like this: ``` helm upgrade -n pyroscope-test --install grafana grafana/grafana \ --set env.GF_DIAGNOSTICS_PROFILING_ENABLED=true \ --set env.GF_DIAGNOSTICS_PROFILING_ADDR=0.0.0.0 \ --set env.GF_DIAGNOSTICS_PROFILING_PORT=6060 \ --set-string 'podAnnotations.profiles\.grafana\.com/cpu\.scrape=true' \ --set-string 'podAnnotations.profiles\.grafana\.com/cpu\.port=6060' \ --set-string 'podAnnotations.profiles\.grafana\.com/memory\.scrape=true' \ --set-string 'podAnnotations.profiles\.grafana\.com/memory\.port=6060' \ --set-string 'podAnnotations.profiles\.grafana\.com/goroutine\.scrape=true' \ --set-string 'podAnnotations.profiles\.grafana\.com/goroutine\.port=6060' ``` This is realted to grafana/pyroscope#3753 Signed-off-by: Christian Simon <[email protected]>
The problem with the grafana helm is that we don't have the profiling port exposed as part of the containerPorts of the container. So I had to reuse/abuse the gossip-tcp port in order to get it to be scraped. It also was using the wrong annotation of "pyroscope.grafana.com" instead of "profiles.grafana.com". Fixes #3523 (cherry picked from commit 6045daa)
The problem with the grafana helm is that we don't have the profiling port exposed as part of the containerPorts of the container. So I had to reuse/abuse the gossip-tcp port in order to get it to be scraped. It also was using the wrong annotation of "pyroscope.grafana.com" instead of "profiles.grafana.com". Fixes #3523 (cherry picked from commit 6045daa)
…3754) The problem with the grafana helm is that we don't have the profiling port exposed as part of the containerPorts of the container. So I had to reuse/abuse the gossip-tcp port in order to get it to be scraped. It also was using the wrong annotation of "pyroscope.grafana.com" instead of "profiles.grafana.com". Fixes #3523 (cherry picked from commit 6045daa) Co-authored-by: Christian Simon <[email protected]>
…3755) The problem with the grafana helm is that we don't have the profiling port exposed as part of the containerPorts of the container. So I had to reuse/abuse the gossip-tcp port in order to get it to be scraped. It also was using the wrong annotation of "pyroscope.grafana.com" instead of "profiles.grafana.com". Fixes #3523 (cherry picked from commit 6045daa) Co-authored-by: Christian Simon <[email protected]>
The problem with the grafana helm is that we don't have the profiling port exposed as part of the containerPorts of the container. So I had to reuse/abuse the gossip-tcp port in order to get it to be scraped.
It also was using the wrong annotation of "pyroscope.grafana.com" instead of "profiles.grafana.com".
Fixes #3523