All Products
Search
Document Center

Application Real-Time Monitoring Service:Start monitoring multi-container applications in a single pod

Last Updated:Dec 01, 2025

In a Sidecar scenario, a pod may contain multiple containers running applications in different programming languages. This topic provides best practices for monitoring multi-language applications using the ack-onepilot component in a Sidecar scenario.

Prerequisite

The ack-onepilot version must be 4.2.0 or later.

Procedure

  1. Refer to the following documents to install ack-onepilot and grant the appropriate resource access permissions:

  2. Add relevant tags to the workload.

    Sample application YAML

    apiVersion: apps/v1
    kind: Deployment
    metadata:
      labels:
        app: multicontainer          
      name: multicontainer
    spec:
      progressDeadlineSeconds: 600
      replicas: 1
      revisionHistoryLimit: 10
      selector:
        matchLabels:
          app: multicontainer
      strategy:
        rollingUpdate:
          maxSurge: 25%
          maxUnavailable: 25%
        type: RollingUpdate
      template:
        metadata:
          labels:
            app: multicontainer
            apsara.apm/container.test-java.app-language: java
            apsara.apm/container.test-java.armsPilotAutoEnable: 'on'
            apsara.apm/container.test-java.armsPilotCreateAppName: multilanguage-java
            apsara.apm/container.test-go.app-language: golang
            apsara.apm/container.test-go.armsPilotAutoEnable: 'on'
            apsara.apm/container.test-go.armsPilotCreateAppName: multilanguage-go
            apsara.apm/container.test-python.app-language: python
            apsara.apm/container.test-python.armsPilotAutoEnable: 'on'
            apsara.apm/container.test-python.armsPilotCreateAppName: multilanguage-python
        spec:
          containers:
            - command:
                - sleep
                - '360000'
              image: alibaba-cloud-linux-3-registry.cn-hangzhou.cr.aliyuncs.com/alinux3/alinux3:latest
                # Replace with your actual Java application image
              imagePullPolicy: Always
              name: test-java
              resources:
                requests:
                  cpu: 250m
                  memory: 512Mi
            - command:
                - sleep
                - '3600000'
              image: alibaba-cloud-linux-3-registry.cn-hangzhou.cr.aliyuncs.com/alinux3/alinux3:latest
                # Replace with actual Go application image
              imagePullPolicy: Always
              name: test-go
              resources:
                requests:
                  cpu: 500m
                  memory: 512Mi
            - command:
                - sleep
                - '3600000'
              image: alibaba-cloud-linux-3-registry.cn-hangzhou.cr.aliyuncs.com/alinux3/alinux3:latest
                # Replace with actual Python application image
              imagePullPolicy: Always
              name: test-python
              resources:
                requests:
                  cpu: 500m
                  memory: 512Mi

    The YAML above represents a complex application that simultaneously uses Java, Golang, and Python programming languages. The application contains three containers with different programming languages, named test-java, test-go, and test-python.

    You can connect these three containers to three different ARMS applications to achieve data isolation. Follow these steps:

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

    2. On the Clusters page, find the cluster you want to manage and click its name. In the left navigation pane, choose Workloads > Deployments.

    3. On the Deployments page, click image > Edit YAML on the right side of the target application.

      To create a new application, click Create From YAML.

    4. Add the following labels to the spec.template.metadata level in the YAML file, and then click Update.

      labels:
        # Please replace ${containerName} with the actual container name
        apsara.apm/container.${containerName}.app-language: java # Replace with the actual programming language of the container
        apsara.apm/container.${containerName}.armsPilotAutoEnable: 'on'
        apsara.apm/container.${containerName}.armsPilotCreateAppName: "<your-deployment-name>"    # Please replace <your-deployment-name> with your application name.
  3. If the application appears on the Application Monitoring > Application List page in the ARMS console and data is being reported, the connection is successful.

    image