How to query and visualize metrics

Installing the demo program

If you haven’t installed the demo program yet, Please refer to Quick Start to install Aeraki, Istio, and the demo.

After installation, you can see that the following two NSs have been added to the cluster, and the Dubbo and Thrift demo applications are installed in these two NSs. You can choose either of them to test.

  1. ~ kubectl get ns|grep meta
  2. meta-dubbo Active 16m
  3. meta-thrift Active 16m

Prometheus and Grafana have been installed in the istio-system NS, and Prometheus will collect requested metrics from the Sidecar Proxy. We can query these metrics through Prometheus and use Grafana dashboards to show these metrics.

  1. ? ~ kubectl get deploy -n istio-system
  2. NAME READY UP-TO-DATE AVAILABLE AGE
  3. aeraki 1/1 1 1 46h
  4. grafana 1/1 1 1 46h
  5. istio-ingressgateway 1/1 1 1 46h
  6. istiod 1/1 1 1 46h
  7. kiali 1/1 1 1 46h
  8. prometheus 1/1 1 1 46h

Query request metrics via Prometheus

First forward the local port to the Prometheus service via the kubectl port-forward command

  1. kubectl port-forward service/prometheus 9090:9090 -n istio-system

Open http://127.0.0.1:9090/ in browser to query the metrics. MetaProtocol’s metrics names have a fixed prefix: “envoy_meta_protocol_$applicationProtocol”, For example, Dubbo metrics have names prefixed with “envoy_meta_protocol_dubbo”, Thrift metrics have names prefixed with “envoy_meta_protocol_thrift”.

Query the outbound request metrics of the Dubbo service: How to query and visualize metrics - 图1

All metrics for Dubbo services: How to query and visualize metrics - 图2 How to query and visualize metrics - 图3

Visualize metrics via Grafana dashboard

First forward the local port to the Grafana service via the kubectl port-forward command.

  1. kubectl port-forward service/grafana 3000:3000 -n istio-system

Import the dashboard json file provided by Aeraki into Grafana as shown below:

How to query and visualize metrics - 图4

Open the Aeraki demo dashboard, you can see the metrics charts of Dubbo and Thrift services, including QPS, request latency, request success rate, etc.

How to query and visualize metrics - 图5

Last modified May 23, 2022: 增加 v1.1 文档目录 (431bf1a)