After you report trace data to Cloud Monitor 2.0 using the non-intrusive monitoring of OpenTelemetry eBPF Instrumentation (OBI), Cloud Monitor 2.0 can monitor your applications. You can then view monitoring data, including application topology, traces, exceptions, slow transactions, and SQL analysis. This topic describes how to use OBI to monitor applications and report data.
Prerequisites
Make sure that your Kubernetes cluster is version 1.24 or later.
If your Kubernetes cluster is not deployed on Alibaba Cloud, ensure the cluster can access the internet or is connected to an Alibaba Cloud Virtual Private Cloud (VPC) through services such as Cloud Enterprise Network (CEN).
Step 1: Install Helm 3
Step 2: Install OBI
Run the following
wgetcommand to download the arms-obi installation package.wget 'https://aliacs-k8s-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/app/charts-incubator/arms-obi-0.10.0.tgz'Run the following command to extract the arms-obi installation package.
tar xvf arms-obi-0.10.0.tgzIn the installation package, edit the values.yaml file. Modify the following parameters for your environment and save the file.
workspace: default-cms-__ACK_UID__-__ACK_REGION_ID__ registry: registry-__ACK_REGION_ID__.ack.aliyuncs.com/acs/ cluster_id: __ACK_CLUSTER_ID__ accessKey: __ACCESSKEY__ accessKeySecret: __ACCESSKEY_SECRET__ uid: "__ACK_UID__" region_id: __ACK_REGION_ID__workspace: Replace__ACK_UID__and__ACK_REGION_ID__with the UID of your primary account and the region ID to which you want to report data. If you want to report data to a non-default workspace, replace this value with the workspace name in Cloud Monitor 2.0.registry: Specifies the arms-obi image repository address.arms-obiincludes three images. If your environment cannot access the internet, you must sync these images to your private repository:registry-cn-hangzhou.ack.aliyuncs.com/acs/obi:obi-app-update-0.10.0 registry-cn-hangzhou.ack.aliyuncs.com/acs/obi:0.10.0 registry-cn-hangzhou.ack.aliyuncs.com/acs/obi:init-0.10.0cluster_id: A custom Kubernetes cluster ID, which is the unique identifier of the cluster. We recommend using a descriptive format.accessKeyandaccessKeySecret: The AccessKey ID and AccessKey Secret of your primary account. See Create an AccessKey.ImportantMake sure that the primary account has the AliyunARMSFullAccess and AliyunSTSAssumeRoleAccess permissions.
uid: The ID of your primary account. To obtain the ID, hover over your profile picture in the upper-right corner of the Alibaba Cloud console.region_id: The Alibaba Cloud region ID. For supported regions, see Supported regions.
Run the following command to install arms-obi. Run this command from outside the
arms-obidirectory.helm3 upgrade --install arms-obi arms-obi --namespace obi-system --create-namespace
Step 3: Configure the application
To enable gRPC monitoring for an application, you must restart it after integration.
In the
obi-systemnamespace, findarms-obi-configand click Edit.Add the deployment name, namespace, and the application name to be displayed in Cloud Monitor 2.0. The following code provides an example configuration:
discovery: instrument: - k8s_deployment_name: "server" k8s_namespace: "arms-default" name: "server-test-obi"