此内容没有您所选择的语言版本。

Chapter 5. Monitoring OpenShift Serverless components


As an OpenShift Container Platform cluster administrator, you can deploy the OpenShift Container Platform monitoring stack and monitor the metrics of OpenShift Serverless components.

When using the OpenShift Serverless Operator, the required ServiceMonitor objects are created automatically for monitoring the deployed components.

OpenShift Serverless components, such as Knative Serving, expose metrics data. Administrators can monitor this data by using the OpenShift Container Platform web console.

5.1. Configuring cluster for application monitoring

Before application developers can monitor their applications, the human operator of the cluster needs to configure the cluster accordingly. This procedure shows how to.

Prerequisites

  • You must log in as a user that belongs to a role with administrative privileges for the cluster.

Procedure

  1. In the OpenShift Container Platform web console, navigate to Catalog OperatorHub and install the Prometheus Operator in the namespace where your application is.
  2. Navigate to Catalog Developer Catalog and install Prometheus, Alertmanager, Prometheus Rule, and Service Monitor in the same namespace.

5.2. Verifying an OpenShift Container Platform monitoring installation for use with Knative Serving

Manual configuration for monitoring by an administrator is not required, but you can carry out these steps to verify that monitoring is installed correctly.

Procedure

  1. Verify that the ServiceMonitor objects are deployed.

    $ oc get servicemonitor -n knative-serving
    NAME         AGE
    activator    11m
    autoscaler   11m
    controller   11m
  2. Verify that the openshift.io/cluster-monitoring=true label has been added to the Knative Serving namespace:

    $ oc get namespace knative-serving --show-labels
    NAME              STATUS   AGE   LABELS
    knative-serving   Active   4d    istio-injection=enabled,openshift.io/cluster-monitoring=true,serving.knative.dev/release=v0.7.0

5.3. Monitoring Knative Serving using the OpenShift Container Platform monitoring stack

This section provides example instructions for the visualization of Knative Serving Pod autoscaling metrics by using the OpenShift Container Platform monitoring tools.

Prerequisites

  • You must have the OpenShift Container Platform monitoring stack installed.

Procedure

  1. Navigate to the OpenShift Container Platform web console and authenticate.
  2. Navigate to Monitoring Metrics.
  3. Enter the Expression and select Run queries. To monitor Knative Serving autoscaler Pods, use this example expression.

    autoscaler_actual_pods

    You will now see monitoring information for the Knative Serving autoscaler Pods in the console.

Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.