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

Kubernetes SD for Pods doesn't respect port annotations #2130

Closed
Sushant opened this Issue Oct 27, 2016 · 2 comments

Comments

Projects
None yet
1 participant
@Sushant
Copy link

Sushant commented Oct 27, 2016

What did you do?
Set Pod annotations:

   annotations:
        prometheus.io/scrape: "true"
        prometheus.io/port: "9145"

What did you expect to see?
Prometheus targets with the Pod IPs and port 9145
e.g. http://192.168.100.1:9145/metrics

What did you see instead? Under which circumstances?
Prometheus targets with the Pod IPs and port 80
e.g. http://192.168.100.1:80/metrics

Environment

  • System information:
    Kubernetes: 1.3.5
    Docker host OS: Linux 3.10.0-327.4.5.el7.x86_64 x86_64
  • Prometheus version:
    quay.io/prometheus/prometheus:v1.2.1
  • Prometheus configuration file:
    Similar to Kubernetes example.

Note that after removing prometheus.io/port: "9145" I expected Prometheus to try to scrape with default port 9102 (as per the example docs) but it still tried scraping on port 80.

@Sushant

This comment has been minimized.

Copy link
Author

Sushant commented Oct 27, 2016

On looking closely at the example, I actually realized the regex was not copied correctly. This actually works as expected, apologies.

@Sushant Sushant closed this Oct 27, 2016

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.