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 upK8s Applications\Services monitoring not working in Prometheus #3538
Comments
This comment has been minimized.
This comment has been minimized.
|
/kind bug |
This comment has been minimized.
This comment has been minimized.
|
I don't think we have enough information to conclude that this is a bug. Do your service or pod have more than one port? When you curl that metrics path on an individual pod, what happens? |
This comment has been minimized.
This comment has been minimized.
|
No our service is exposed on a single port. When I curl the metrics path (http://10.40.0.2:8080/xyz/metrics) I get the below error: {"timestamp":1512381497403,"status":404,"error":"Not Found","message":"No message available","path":"/xyz/metrics"}**** |
This comment has been minimized.
This comment has been minimized.
|
That is exactly what Prometheus is also getting. Your application is not exposing anything under the path that you have configured Prometheus to scrape from – I'm afraid there is nothing Prometheus can do at this point; this is an issue with your application or the metrics path that you specify via the annotation. Under which path does your application expose metrics in the Prometheus format? I'm going to close this, since Prometheus is behaving correctly. If you have further questions, please take them to the appropriate channels. |
matthiasr
closed this
Dec 4, 2017
This comment has been minimized.
This comment has been minimized.
|
@matthiasr That is what I am not able to understand. Whatever Metrics path I gave in my service\application via annotation, same is coming in the Prometheus in Target page but there are no metrics available. What could be the reason for the same. |
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. |
varuntalus commentedDec 4, 2017
What did you do?
I am trying to monitor my Kubernetes cluster components and the applications deployed in it. I am using prometheus 1.8.2 version.
What did you expect to see?
I was expecting several metrics which would let me know the health of my K8s cluster components as well the applications\PODs running in it.
What did you see instead? Under which circumstances?
After deploying Prometheus and run it as a POD in my K8s cluster, I could see the Target jobs got created for API Server, Nodes, CAdvisor, Node exporters. I could see jobs got created for few EndPoints as well. All these jobs are UP and running.
But the jobs which got created for my business applications\Services (running in K8s) they are all DOWN. Prometheus UI shows the below error for all these jobs:
"server returned HTTP status 404"
Prometheus version:
1.8.2
Prometheus configuration file:
I have used below annotations in my application deployment and Service YAML files.
Request you to please check this issue and help in resolving this.
Thansks!!!!!