All Products
Search
Document Center

Container Service for Kubernetes:View Prometheus monitoring data in Knative dashboard

Last Updated:Dec 23, 2024

Container Service for Kubernetes (ACK) clusters are compatible with Managed Service for Prometheus and Managed Service for Grafana, eliminating the need to build your own monitoring systems and dashboards. After deploying applications in Knative, you can import monitoring data from Knative to Managed Service for Prometheus and view real-time metrics such as response latency, request concurrency, CPU, and memory usage through Grafana dashboards.

Prerequisites

Knative is deployed in your cluster. For more information, see Deploy Knative.

Billing rules

After ingesting the Knative monitoring data to Managed Service for Prometheus, the corresponding components can automatically send monitoring metrics to Managed Service for Prometheus. These metrics are treated as custom metrics. Fees are charged for custom metrics.

Before you enable this feature, we recommend that you read Billing overview to understand the billing rules of custom metrics. The fees may vary based on the cluster size and number of applications. You can follow the steps in View resource usage to monitor and manage resource usage.

Activate Managed Service for Prometheus

  1. Log on to the ACK console. In the left-side navigation pane, click Clusters.

  2. On the Clusters page, find the cluster that you want to manage and click its name. In the left-side navigation pane, choose Applications > Knative.

  3. On the Knative Components page, select the Monitoring Dashboards tab, and click Enable Prometheus Dashboard.

View the Knative dashboard

After activating Managed Service for Prometheus, you can view the monitoring data on the Monitoring Dashboards tab.

Category

Description

Request data

In the Overview (average over the selected time range) section, you can view the number of Knative requests (Request Volume), request success rate (Success Rate), client errors (4xx), server errors (5xx), and pod scaling trend.

Note

The vertical axis ops/sec of the Request Volume, 4xx, and 5xx charts indicates the number of requests processed per second.

overview

Response latency data

In the Response Time section, you can view the response latency data of Knative, including the P50, P90, P95, and P99 response latency.time

Request concurrency data

In the Autoscaler section, you can view detailed information about the request concurrency of Knative.请求并发数

Resource usage

In the Resource Usages section, you can view the usage information of Knative resources, including CPUs and memory.use

View key service discovery metrics of Knative

  1. Log on to the ARMS console.

  2. In the left-side navigation pane, click Integration Management.

  3. On the Integration Management page, click the Integrated Environments tab, click the Container Service, and click the name of the Prometheus instance.

  4. On the page that appears, click the Metric Scraping tab to view the Knative Service discovery metrics. The following table describes the key service discovery metrics of Knative.

Note
  • When the number of pods for a Knative application is scaled to zero, metrics such as the request concurrency and the number of requests sent to a pod per second cannot be collected by Managed Service for Prometheus. You can view these metrics in the console only after you access the pods of the Knative application.

  • When the number of pods for a Knative application is not zero, you can directly view the metrics in the console, such as the request concurrency and the number of requests sent to a pod per second. You do not need to access the pods of the Knative application.

Metric

Description

queue_average_concurrent_requests

The number of concurrent requests sent to a pod.

queue_requests_per_second

The number of requests sent to a pod per second.

revision_request_latencies

The response latency.

revision_request_count

The number of revision requests.

References

You can use Simple Log Service for log collection, monitoring and alerting. For more information, see Enable Simple Log Service on Knative and Configure alerting for Knative Services.