第 2 章 监控 Camel K 集成
Red Hat Integration - Camel K 监控基于 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 项目中是否存在ConfigMap 对象:cluster-monitoring-config$ oc -n openshift-monitoring get configmap cluster-monitoring-config如果不存在,创建
cluster-monitoring-configConfigMap:$ oc -n openshift-monitoring create configmap cluster-monitoring-config编辑
cluster-monitoring-configConfigMap:$ 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
其他资源