Problem description

In the Alibaba Cloud Container Service for Kubernetes cluster, after the Java application installs Agent, the application monitoring has no data.

Causes

The pod where the application is located has not been injected into the arms-init-container, there is no Annotations annotation in the application YAML file, and STS service is not authorized correctly, which may cause the application monitoring to have no data.

Solutions

You must grant relevant permissions on the resources to the RAM user by using RAM authorization.

  1. Log in to the Alibaba Cloud Container Service for Kubernetes console.
  2. In the left-side navigation pane, choose Clusters. On the Clusters page, click Applications in the Actions column of the target cluster.
  3. On the Container Groups tab, select the namespace where your application is located, and click Edit on the right of the application.
  4. in the Edit YAML dialog box to see if the initContainers exists in the YAML file.

    • If it does not exist, the arms-init-container has not been injected. Perform step 5.
    • If it exists, the arms-init-container has been injected and step 8 is performed.
  5. Select Namespace as arms-pilot at the top of the Container Group tab. Check whether pods with arms-pilot name prefixes exist in the pod list.
  6. On the Stateless or Stateful tab page, choose More > View Yaml in the Actions column on the right side of the target application. In the Edit YAML dialog box, check whether the following Annotations annotation exists in the YAML file.
    annotations: armsPilotAutoEnable: 'on' armsPilotCreateAppName: [$Your_Deployment_Name]
    Description :[$Your_Deployment_Name] is the declarative update name of the resource.
    • If it exists, perform step 7.
    • If it does not exist, add the above Annotations annotation at the spec > template > metadata level in the edit YAML dialog box, replace the [$Your_Deployment_Name] with your application name, and then click update.
  7. On the Container Group tab, click Logs on the right of the target application to check whether STS errors are reported in the pod logs of arms-pilot. The message is "Message":"STS error".
  8. On the Pods tab, click Edit. In the Edit YAML dialog box, check whether the following javaagent parameters exist in the YAML file.
    -javaagent:/home/admin/.opt/ArmsAgent/arms-bootstrap-1.7.0-SNAPSHOT.jar
    • If it exists, click the terminal on the right side of the Container Group tab to go to the Command Line page. Run the following command to go to the logs directory to check whether there are log files suffixed with. log, and then contact the ARMS DingTalk service account: arms160804.
      cd /home/admin/.opt/ArmsAgent/logs
    • If the YAML file does not contain the parameter, contact the DingTalk account arms160804 for support.

Application scope

  • Connect an ACK cluster to Prometheus Service
  • Application Real-Time Monitoring Service (ARMS)