Querying Metrics Monitoring Indicators from Prometheus

Prerequisites

This article demonstrates how to deploy Prometheus in a Kubernetes environment and achieve monitoring data statistics and querying for the Dubbo cluster. You need to complete or possess the following:

Ensure Prometheus is Running Correctly

Verify that Prometheus has been correctly deployed

  1. kubectl -n dubbo-system get svc prometheus-server
  2. NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
  3. prometheus-server ClusterIP 10.109.160.254 <none> 9090/TCP 4m

Deploy Sample

  1. kubectl apply -f https://raw.githubusercontent.com/apache/dubbo-samples/master/4-governance/dubbo-samples-metrics-spring-boot/Deployment.yml

Wait for the sample application to run normally, and confirm the application status using the following command:

  1. kubectl -n dubbo-demo get deployments

Query Prometheus

Obtain the Prometheus access address kubectl port-forward service/prometheus-server 9090:9090, open a browser, and visit localhost:9090/graph to access the Prometheus console.

Next, execute the Prometheus query command. You can confirm the Metrics supported by Dubbo here.

1. In the “Expression” overview, enter dubbo_consumer_qps_total, and the following results will return

img

Feedback

Was this page helpful?

Yes No

Last modified September 30, 2024: Update & Translate Overview Docs (#3040) (d37ebceaea7)