I have installed Prometheus server and adapter on Kubernetes cluster, to collect metrics from Kubernetes objects.
Prometheus server and adapter are installed using Helm charts and they are running fine. Now deployed Spring boot app which serves metrics at the endpoint /actuator/prometheus.
added below annotation in deployment file:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8080"
prometheus.io/path: "/actuator/prometheus"
Now i could see custom metrics at pod level:
When i try to see metrics at Service level, it is throwing error:
Error from server (NotFound): the server could not find the metric redis_queue_box_provider_size for service
metric samples collected into prometheus server:
Is there any configuration i have to do to gather metrics at service level?