-
Notifications
You must be signed in to change notification settings - Fork 191
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
unable to get metric http_requests: no metrics returned from custom metrics API #32
Comments
@stefanprodan Any clue? |
@stefanprodan What changes do i need to perform when i wish to run my apps under separate namespace? |
Any update on this?, i'm running into same issue |
Any update? |
Guys, any update on this? Was any one able to achive this with nginx or any other service? |
@krish512 Was wondering the same. How do we get the http_requests custom metrics from any pod we deploy? Is there something we need to insert/configure with the deployment or image itself? It only works with that podinfo deployment. |
I guess the pod needs to expose this metrics and Custom Metrics Exporters can just capture these and make them available for HPA |
did anyone resolve this issue? |
I was finally able to figure it out. Each webserver that needs monitoring(like the go example or apache or in our case nginx), has its own mechanism to expose metrics for prom to scrape. In the case of nginx, I had to enable the module nginx-module-vts, and then create a simple rule. Here is a link to my repo if you want to see. https://github.com/ntman4real/nginxmets Let me know if you have any questions, and I am now seeing how to do the same with springboot. More to come! |
Thanks i'm looking to expose metrics for Go & Node... but i'll check it out... Thanks! |
Add a rule to - seriesQuery: '{__name__=~"^http_requests_.*",kubernetes_pod_name!="",kubernetes_namespace!=""}'
seriesFilters: []
resources:
overrides:
kubernetes_namespace:
resource: namespace
kubernetes_pod_name:
resource: pod
name:
matches: ^(.*)_(total)$
as: "${1}"
metricsQuery: sum(rate(<<.Series>>{<<.LabelMatchers>>}[1m])) by (<<.GroupBy>>) |
Hi,
I followed the instructions and deployed podinfo app and i am able to scale the app on http_requests. However, whenever i run my own app or just nginx, i am getting error as "unable to get metric http_requests: no metrics returned from custom metrics API". Deployment files are exactly the same, just changed port number, health_checks and labels.
Is my app running??
[ec2-user@ip-192-168-101-39 ~]$ curl -I http://10.100.195.60:9899
HTTP/1.1 200 OK
Server: nginx/1.17.3
I would like to know why i am not able to see http_requests for nginx app?
The text was updated successfully, but these errors were encountered: