Scrape App metrics using Prometheus with Envoy side car proxy

956 views Asked by At

I am using GKE for my workloads. I have installed Istio 1.11.0 on my cluster. I have also have installed Prometheus in istio-system namespace using this link.

I have a Python application deployed in the prom-test namespace, which is collecting metrics at port 8080 as below.

app metrics

I have used the below annotation in the deployment file to have the metrics scraped by Prometheus

apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    prometheus.io/scrape: "true"
    prometheus.io/port: "8080"
    prometheus.io/scheme: http
    prometheus.io/path: "/metrics"

There are 2 containers running in the 1) the application container and 2) the envoy proxy container

enter image description here

When I bring up the Prometheus dashboard, I see all Targets are up and for my app its being scraped at

enter image description here

But I could see any application related metrics?

enter image description here

It would be really helpful, if veterans here can advise on the same

1

There are 1 answers

0
Sunil On

I have solved this. It seems for. Python i need to add the info as a scrape config in prommetheus.yaml file. Once I have implemented the same, it started working.

Able to see the metrics on Istio prometheus.