Help Center> Log Tank Service> FAQs> ICAgent Installation> What Can I Do If New Logs Cannot Be Queried on the Raw Log Page?
Updated on 2024-03-05 GMT+08:00

What Can I Do If New Logs Cannot Be Queried on the Raw Log Page?

Background

New logs cannot be queried on the raw log page.

Impact

Users cannot query service logs.

Possible Causes

  1. The log collection function is disabled.
  2. A log fails to be sent.
  3. An abnormal collection configuration by LTS overwrites the correct collection configuration.

Fault Locating

  1. Check whether the log collection function is enabled.

    1. Log in to the LTS console and choose Configuration Center in the navigation pane on the left.
    2. On the Log Collection tab page, check whether the log collection function is enabled. If not, enable it.

  2. Check the configuration of the log collection function delivered last time.

    1. Log in to the ECS host where ICAgent is installed.
    2. Run the cd /var/ICAgent command to go to the ICAgent log directory.
    3. Run the following command to view the log collection configuration.
      zgrep switchList *.zip //Query the compressed package of transferred logs.
      cat oss.icAgent.trace | grep switchList //Query the current log file.

      Search for the latest log time configuration from the filtering result and check whether the value of switch.log is true (indicating that log collection is enabled).

  3. Check whether the value of switch.log in the log collection switch file is true (indicating that log collection is enabled).

    1. Log in to the host where ICAgent is installed.
    2. Query the log collection file path.
      cat /var/share/oss/manager/ICProbeAgent/internal/TRACE_CONFIG/swithes_context.json

      The value of switch.log in the log collection switch file is true.

  4. Check whether the log fails to be sent.

    1. Log in to the ECS host where ICAgent is installed.
    2. Run the cd /var/ICAgent command to go to the ICAgent log directory.
    3. Query the log that failed to be sent.
      cat oss.icAgent.trace | grep httpsend | grep 'dataType:TRACE' | grep failed
      zgrep 'dataType:TRACE' *.zip | grep httpsend | grep failed

      If failed is displayed, contact LTS technical support.

  5. Confirm the configuration by LTS.

    1. Log in to the ECS host where ICAgent is installed.
    2. Run the cd /var/ICAgent command to go to the ICAgent log directory.
    3. Filter log files to query log collection configuration by LTS.
      cat oss.icAgent.trace | grep 'als event' | grep -v grep | tail -n 1

      (The preceding figure is for reference only.) Search for the log group, log stream, and collection path set by the user based on the filtering result to ensure that the collection configuration has been delivered.

    4. If the log file cannot be found, query the compressed log package.
      zgrep 'als event' *.zip | grep -v grep | tail -n 1

    5. Log in to the LTS console and check whether the collection configuration is correctly delivered.

ICAgent Installation FAQs

more