Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upInvalid Scrape Target in 'kubernetes-pods' for Pods with Multiple Containers #3530
Comments
This comment has been minimized.
This comment has been minimized.
|
It makes more sense to ask questions like this on the prometheus-users mailing list rather than in a GitHub issue. On the mailing list, more people are available to potentially respond to your question, and the whole community can benefit from the answers provided. |
brian-brazil
closed this
Dec 8, 2017
This comment has been minimized.
This comment has been minimized.
|
Oh, my bad. So this is not a bug/issue? |
This comment has been minimized.
This comment has been minimized.
|
If there's no port for a target, we use 80 as a default. Thus this is likely expected behaviour. |
This comment has been minimized.
This comment has been minimized.
|
Yes, but there is no port, nor target for the second container. |
This comment has been minimized.
This comment has been minimized.
|
My take on this (and this is why I created this as an issue type):
as well as a container (one container) has:
and the second container does not even have an open port, but is used to install
So I would expect Prometheus would scrape only the "declared" or annotated port and not scrape every available container in the pod by assigning a default port "80" |
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 23, 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. |
ichekrygin commentedNov 30, 2017
What did you do?
Run Prometheus v2.0.0 and conf with
kubernetes-podsscrape configuration.Run multi-container pod with specific prometheus port annotation and port definition in one container only
What did you expect to see?
Prometheus creates targets entries in
kubernetes-podsonly for pods/containers with defined port.What did you see instead? Under which circumstances?
Prometheus creates targets entries in
kubernetes-podsfor all pods/dcontainers, adding default port80for a container w/out port definitionEnvironment
System information:
Linux 4.11.12-coreos-r1 x86_64
Prometheus version:
Alertmanager version:
n/a
Prometheus configuration file:
Alertmanager configuration file:
n/a
Logs:
n/a