I’m running a workload on a VM, with the istio sidecar installed. However, I don’t see any metrics for this workload, so it also doesn’t show up in Kiali.
When looking at the prometheus targets, the VM is indeed not there.
How is this supposed to work, is it actually implemented?
Envoy on the VM, also doesn’t seem to have any metrics on the app that is running
Hi @wfournier,
Have you tried adding a job to your prometheus config to scrape your VM? If the Istio Proxy on your VM can be reached by your prometheus, you can add a job to your prom config to scrape the VM endpoint. Here’s a really basic example:
- job_name: bookinfo-vms
honor_timestamps: true
scrape_interval: 15s
scrape_timeout: 10s
metrics_path: /stats/prometheus
scheme: http
follow_redirects: true
static_configs:
- targets:
- details-v1:15020
- productpage-v1:15020
- ratings-v1:15020
- reviews-v1:15020
- reviews-v2:15020
- reviews-v3:15020
In this example, the targets are just resolvable hostnames for individual VMs. Since your VM is running outside of kubernetes, it won’t be autodiscovered by prometheus the same way that workloads within kubernetes would.
I’ll try to see what is available on that endpoint, I remember not having any metrics for the workloads, on that metrics endpoint. I’ll be testing with this again soon, and I’ll drop an update here.
Thanks!
It looks like this just works, indeed. Don’t know what I did wrong before, but now I do see metrics on the connections to the remote service instances.
Connecting to localhost:15020/stats/prometheus, whilst inside an app container, gives the the metrics of the side-car, where I do see metrics on the remote service instances that the local app is connecting to.