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

Enhancement : add Prometheus annotation when extension : metrics + kubernetes are used #10301

Closed
survivant opened this issue Jun 26, 2020 · 4 comments · Fixed by #10341
Closed
Assignees
Labels
Milestone

Comments

@survivant
Copy link
Contributor

when we are using metrics + kubernetes extensions, should we add those annotations to the pods into the generated file target\kubernetes\kubernetes.yml

I found this in prometheus helm chart documentation : https://github.com/helm/charts/tree/master/stable/prometheus

In order to get prometheus to scrape pods, you must add annotations to the the pods as below:

metadata:
  annotations:
    prometheus.io/scrape: "true"
    prometheus.io/path: /metrics
    prometheus.io/port: "8080"
spec:

I tested by adding

kubectl annotate pods iep-monitoring-junk-f8fbbdbb9-84jkt prometheus.io/scrape="true"
kubectl annotate pods iep-monitoring-junk-f8fbbdbb9-84jkt prometheus.io/path=/metrics
kubectl annotate pods iep-monitoring-junk-f8fbbdbb9-84jkt prometheus.io/port="8080"

and Prometheus started to scrape metrics from my application.

@survivant survivant added the kind/bug Something isn't working label Jun 26, 2020
@survivant
Copy link
Contributor Author

@geoand ping

@geoand
Copy link
Contributor

geoand commented Jun 29, 2020

#10341 should take care of the issue

@survivant
Copy link
Contributor Author

that was fast :) thanks

@geoand
Copy link
Contributor

geoand commented Jun 29, 2020

Thanks for reporting!

geoand added a commit to geoand/quarkus that referenced this issue Jun 29, 2020
gastaldi added a commit that referenced this issue Jun 30, 2020
Add Prometheus annotations when smallrye metrics in enabled
@gsmet gsmet added this to the 1.7.0 - master milestone Jul 2, 2020
gsmet pushed a commit to gsmet/quarkus that referenced this issue Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants