Help Center > > Getting Started> Installing and Configuring the ICAgent

Installing and Configuring the ICAgent

Updated at: Aug 14, 2019 GMT+08:00

The ICAgent is a log collection tool running on the server where logs are collected. If you use Log Tank Service (LTS) for the first time, install the ICAgent and configure log collection rules.


Before installing the ICAgent, ensure that the time and time zone of the local browser are consistent with those of the server where logs are collected. If multiple servers are deployed, ensure that the local browser and multiple servers use the same time zone and time. If they use different time or time zones, the log information may be incorrect.

Installing the ICAgent

  1. Obtain the Access Key ID/Secret Access Key (AK/SK) on the My Credentials page. .
  2. Choose Service List > Management & Deployment > Log Tank Service.
  3. In the navigation pane, click Agent Management to go to the Agent Management page.
  4. Click Install ICAgent.
  5. Generate the ICAgent installation command and copy it.
    Installation mode is set to Obtain AK/SK by default. Enter the AK/SK obtained in 1 in the text box to generate the ICAgent installation command. Then, click Copy Command to copy the ICAgent installation command.
    Figure 1 Installing the ICAgent

    Ensure that the AK/SK are correct. Otherwise, the ICAgent cannot be installed.

  6. Use a remote login tool, for example, PuTTY, to log in to the server where the ICAgent is to be installed as the root user and run the preceding command to install the ICAgent.
    • If the message ICAgent install success is displayed, the ICAgent is successfully installed in the /opt/oss/servicemgr/ directory. After the ICAgent is successfully installed, choose Agent Management in the LTS navigation pane to view the ICAgent status.
    • If the installation fails, uninstall the ICAgent and reinstall it. If reinstallation fails, contact technical support.

Configuring Log Collection Rules

After the ICAgent is installed, you need to configure log collection rules. Otherwise, log data cannot be uploaded. This section describes how to configure log collection information.


  • You have created log groups and log streams.
  • You have installed the ICAgent.


  1. Switch to the homepage, click in the upper left corner, and select the desired region and project.
  2. Choose Service List > Management & Deployment > Log Tank Service.
  3. In the log group list, select a created log group. Logs are collected to this log group.
  4. In the log stream list, select a created log stream. Logs are collected to the log stream.
  5. Click Collection Configuration in the navigation pane. The collection configuration details page is displayed.

  6. Click Add Path. The Add Collection Configuration page is displayed.
  7. Add the server whose logs you want to collect and click Next. The Configure Collection Path page is displayed.
  8. In the Configure Collection Path step, add the path of the host whose logs you want to collect.
    Wildcards are not supported. The following is an example:

    By default, system logs are not collected. To collect system logs, you need to manually configure the collection path for system logs. The paths for collecting system logs of different Operating Systems (OSs) are as follows:

    • Check whether sensitive information is collected.
    • The log collection path must be unique. That is, if one log collection path of a host is configured for different log streams, only one log stream can collect logs.
    • If the same log collection path of the same host is configured in Application Operations Management (AOM), the path cannot be configured in LTS.
  9. Click Next. The Configure Collection Information page is displayed.
    Table 1 Parameters to be configured



    Log Format

    Select a log format based on the type of logs you need to collect. For example, select Single-line logs.

    If each line in a log file represents a datum, select Single-line. If the log contains Java exceptions (a log datum is displayed in several lines), select Multi-line.

    Log Time

    System Time: Log collection time by default. This time mode is suitable for logs without the printing time. For example, select System Time.


    The ICAgent collects and uploads logs to LTS in real time.

    Time Wildcard: Specifies the log time in the form of wildcards. If the collected log data contains time, use this parameter to mark a piece of log data. For example, if the time of a log is 2017-01-01 23:59:59, specify the value as YYYY-MM-DD hh:mm:ss.


    If a log does not contain year information, the ICAgent regards it as the log of the current year.


    M    - month (1)     
    MM   - month (01)    
    MMM  - month (Jan)    
    MMMM - month (January)
    D    - day (2)       
    DD   - day (02)       
    DDD  - day (Mon)      
    DDDD - day (Monday)   
    YY   - year (06)     
    YYYY - year (2006)    
    hh   - hours (15)     
    mm   - minutes (04)   
    ss   - seconds (05)   
    hpm     - hours (03PM)h:mmpm     
    - hours:minutes (03:04PM)h:mm:sspm  
    - hours:minutes:seconds (03:04:05PM)       
    hh:mm:ss ZZZZ (16:05:06 +0100)       
    hh:mm:ss ZZZ  (16:05:06 CET)       
    hh:mm:ss ZZ   (16:05:06 +01:00)
  10. Click OK to complete the log collection configuration. In this case, LTS collects logs based on the preset collection rules.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?

Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel