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 upNot able to scrape endpoints in kubernetes using prometheus and blackbox #2175
Comments
This comment has been minimized.
This comment has been minimized.
|
Note that the kubernetes SD config had a breaking change in the v1.3.0 release. It seems like your config is the old format. Have a look at the sample config for guidance. |
This comment has been minimized.
This comment has been minimized.
|
when i try sample config , it throws then i add api_servers configs and target is created for nodes but not for apiserver
|
This comment has been minimized.
This comment has been minimized.
|
Are you sure you are using the v1.3.0 container? The log output says differently
|
This comment has been minimized.
This comment has been minimized.
|
My mistake, changed it to 1.3.0 in deployment file. |
This comment has been minimized.
This comment has been minimized.
|
If |
This comment has been minimized.
This comment has been minimized.
|
I want flexibility of creating different metrics for services. relable config in prometheus.yml file
But the endpoint does not change(http://10.244.3.4:80/metrics) Do u have any example to refer to? |
This comment has been minimized.
This comment has been minimized.
|
hey that worked by replacing action to "replace" |
This comment has been minimized.
This comment has been minimized.
|
Yes, the "keep" action only makes Prometheus keep that particular target, whereas "replace" by default takes the content of the Does that solve your questions? |
This comment has been minimized.
This comment has been minimized.
|
kubernetes-apiservers and kubernetes-pods jobs are not getting displayed on prometheus dashboard |
This comment has been minimized.
This comment has been minimized.
|
Make sure that the annotations are set in the |
This comment has been minimized.
This comment has been minimized.
Krylon360
commented
Nov 9, 2016
•
|
it doesn't look like you have the label map action on the api-server nor the pod job. This is what I have for my api-server job. (Note: we use Ansible to set the ${VALUES}; and we are running it out of cluster. (Note2: this is pre-1.3.0; we are on 1.2.2)
Also; the screenshot you posted in the OP; has your API server. You have your job named: |
This comment has been minimized.
This comment has been minimized.
|
@brancz
|
This comment has been minimized.
This comment has been minimized.
Krylon360
commented
Nov 10, 2016
|
Looks like you're setting the prometheus.io/port to port 80; however, you have the pod scraping job set to probe HTTPS. |
This comment has been minimized.
This comment has been minimized.
|
@Krylon360 I will try updating to http bcoz default is https |
This comment has been minimized.
This comment has been minimized.
boj
commented
Nov 10, 2016
|
I'm seeing the same thing as @Priyanka098 - I've simply loaded the sample config into a ConfigMap and have a Deployment set to pull the latest Prometheus image. |
This comment has been minimized.
This comment has been minimized.
Krylon360
commented
Nov 10, 2016
|
I'll need to load a local instance of 1.3 and do some testing tomorrow. I know I've been getting the "Kubernetes SD configuration requires at least one Kubernetes API server" error occurring at random times on 1.2.2 as well. Also, what version of k8s? I ask due to breaking changes made when they cut over to kube-dns. |
This comment has been minimized.
This comment has been minimized.
|
Sorry there's been a few different issues in here that have been worked through & I've lost track of what issue you're hitting at the moment. Could you clarify please? Last I see is the |
This comment has been minimized.
This comment has been minimized.
boj
commented
Nov 10, 2016
|
@jimmidyson I'm currently getting the "Kubernetes SD configuration requires at least one Kubernetes API server" error. My cluster is running k8s v1.4.5, prometheus:latest, and the sample config verbatim. |
This comment has been minimized.
This comment has been minimized.
|
@jimmidyson
does this mean something like below in apiserver job?
|
This comment has been minimized.
This comment has been minimized.
|
@Priyanka098 Yes try that. @boj That looks like you're using an old version - that error message doesn't appear in 1.3.1 AFAIK & can't see it in config validation. Please use the tagged version |
This comment has been minimized.
This comment has been minimized.
|
I tried that and then api-server job appeared on dashboard with error |
This comment has been minimized.
This comment has been minimized.
|
hey i resolved that....I was using http instead of https |
This comment has been minimized.
This comment has been minimized.
|
So it's working for you? I'll send in a PR with the updated example config. |
This comment has been minimized.
This comment has been minimized.
Krylon360
commented
Nov 10, 2016
|
Awesome. Bryce Walter On Nov 10, 2016 2:37 AM, "Priyanka098" notifications@github.com wrote: hey i resolved that....I was using http instead of https — |
This comment has been minimized.
This comment has been minimized.
boj
commented
Nov 10, 2016
|
@jimmidyson Ah, thanks for the hint. Turns out I was using quay.io/coreos/prometheus and not quay.io/prometheus/prometheus |
jimmidyson
referenced this issue
Nov 10, 2016
Merged
Kubernetes SD: Add endpoints role to API servers job to actually discover some API servers #2181
This comment has been minimized.
This comment has been minimized.
boj
commented
Nov 10, 2016
|
I now get the following error:
|
This comment has been minimized.
This comment has been minimized.
I have added scheme: http in my job kubernetes-service-endpoints |
This comment has been minimized.
This comment has been minimized.
|
@Priyanka098 Add another annotation to the service: |
This comment has been minimized.
This comment has been minimized.
|
All jobs are up except kubernetes-pods
|
This comment has been minimized.
This comment has been minimized.
|
@boj |
This comment has been minimized.
This comment has been minimized.
|
@Priyanka098 Those annotations should be in |
This comment has been minimized.
This comment has been minimized.
|
@jimmidyson |
This comment has been minimized.
This comment has been minimized.
|
@Priyanka098 You're welcome. Can you close this now please? |
Priyanka098
closed this
Nov 10, 2016
This comment has been minimized.
This comment has been minimized.
Vishal-Gaur
commented
May 19, 2018
|
hiii, |
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 22, 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. |
Priyanka098 commentedNov 8, 2016
•
edited by brian-brazil
What did you do?
Deployed prometheus in kubernetes and it scraping nodes and showing status on dashboard.
What did you expect to see?
Scraping services and endpoints of k8s
What did you see instead? Under which circumstances?
kubernetes-service-endpoints and kubernetes-services are down. I dont understand if its the problem of k8s configuration in my cluster or blackbox configuration
Environment
Prometheus container v1.3.0
System information:
Linux 3.13.0-92-generic x86_64
Prometheus version:
prometheus, version 1.1.3
build user: root@3e392b8b8b44
build date: 20160916-11:36:30
go version: go1.6.3
Prometheus configuration file: