Updated on 2024-02-25 GMT+08:00

Logs, Monitoring, and Alarms

Log Description

If the log function is enabled for an edge node on the IEF console, the system and application logs generated for the edge node will be uploaded to AOM.

  • System Logs: logs generated by the IEF software (such as edge-core, edge-logger, and edge-monitor) installed on edge nodes.
  • Application Logs: logs generated by applications deployed on edge nodes.
    • Edge nodes will upload logs in the /var/IEF/app/log directory to AOM through IEF. You can mount the /var/IEF/app/log/{appName} directory into the container when creating an application. For details, see hostPath: used for mounting a directory of the host into the container. You can view logs on AOM by {appName}.
    • Edge nodes will also upload container logs in {{DOCKER_ROOT_DIR}}/containers/{containerID}/{containerID}-json.log to AOM. You can run the docker info command to query the value of DOCKER_ROOT_DIR. containerID indicates the container ID.

Viewing Logs on AOM

  1. Log in to the AOM console.
  2. In the navigation pane, choose Log > Log Files, and click the Component tab.
  3. On the displayed page, select cluster ief_global and namespace default.

    Figure 1 Selecting a cluster and a namespace

  4. Search for logs by application name, and click View in the row where the log file resides to view detailed logs.

Viewing Node Monitoring Information on AOM

You can view the node monitoring information on AOM.

  1. Log in to the AOM console.
  2. Click the name of the node whose monitoring information is to be viewed.

    Figure 2 Selecting a monitored node

  3. On the View Monitor Graphs tab page, view the resource usage of the node, such as the CPU usage and memory usage.

    Figure 3 Viewing monitoring information

Viewing Container Monitoring Information on AOM

You can view the monitoring information about the containerized applications deployed on edge nodes on AOM.

  1. Log in to the AOM console.
  2. Select the workload whose monitoring information is to be viewed.

    Figure 4 Selecting a workload

  3. On the View Monitor Graphs tab page, view the monitoring metrics of the container, such as the CPU usage and memory usage.

    Figure 5 Viewing monitoring information

Alarms Preset on IEF

IEF comes with seven types of alarms preconfigured for each edge node. These alarms will be automatically reported to AOM.

Alarm Name

Trigger

Clearance Condition

Severity

Container Engine Is Abnormal

Docker has been enabled on an edge node, and the Docker information fails to be queried.

Docker is running properly, and EdgeCore can obtain the Docker information.

Critical

Application Liveness Probe Is Abnormal

A liveness probe has been configured for the application, and the probe detects an exception.

The probe detects that the container is normal.

Major

Failed to Obtain GPU Resources

GPU resources could not be obtained during GPU application deployment.

GPU resources are obtained.

Critical

Failed to Obtain GPU Information

GPU has been enabled on an edge node, and the GPU information fails to be queried.

The GPU information is successfully queried.

Critical

Invalid AK/SK

EdgeHub has distributed 10 consecutive temporary AK/SK pairs and detects that the AK/SK has expired or is in abnormal state.

EdgeHub successfully distributes the temporary AK/SK.

Major

Application Restarted

The application container restarts unexpectedly.

This alarm does not need to be cleared.

Minor

NIC Bound to the Container Is Faulty

The NIC bound to the container is faulty.

The NIC bound to the container becomes normal.

Critical

Figure 6 Viewing alarms

Setting Alarms on AOM

You can create alarm rules on AOM to monitor metrics of edge nodes. For details, see Creating a Threshold Rule.

Reporting User-Defined Alarms to AOM

IEF can report customized alarms from edge nodes to AOM. To be specific, after the MQTT client publishes alarm information to the MQTT broker, IEF will automatically report the alarms to AOM.

For details, see Alarm Reporting and Alarm Clearance.