Red Hat Camel K is deprecated
Red Hat Camel K is deprecated and the End of Life date for this product is June 30, 2025. For help migrating to the current go-to solution, Red Hat build of Apache Camel, see the Migration Guide.第 2 章 监控 Camel K 集成
Red Hat Integration - Camel K monitoring 基于 OpenShift 监控系统。本章解释了如何在运行时使用可用选项来监控 Red Hat Integration - Camel K 集成。您可以使用已部署为 OpenShift Monitoring 一部分的 Prometheus Operator 来监控您自己的应用程序。
2.1. 在 OpenShift 中启用用户工作负载监控
OpenShift 4.3 或更高版本包括已部署为 OpenShift Monitoring 的一部分的嵌入式 Prometheus Operator。本节介绍如何在 OpenShift Monitoring 中启用对您自己的应用程序服务的监控。这个选项可避免安装和管理独立 Prometheus 实例的额外开销。
先决条件
- 您必须具有集群管理员访问安装 Camel K Operator 的 OpenShift 集群。请参阅 安装 Camel K。
流程
输入以下命令检查
openshift-monitoring 项目
中是否存在cluster-monitoring-config
ConfigMap 对象:$ oc -n openshift-monitoring get configmap cluster-monitoring-config
如果还没有存在,请创建
cluster-monitoring-config
ConfigMap:$ oc -n openshift-monitoring create configmap cluster-monitoring-config
编辑
cluster-monitoring-config
ConfigMap:$ oc -n openshift-monitoring edit configmap cluster-monitoring-config
在
data:config.yaml 下:
,将enableUserWorkload
设置为true
:apiVersion: v1 kind: ConfigMap metadata: name: cluster-monitoring-config namespace: openshift-monitoring data: config.yaml: | enableUserWorkload: true
其他资源