Overview
To provide better log collection service for CLS, LogListener now supports automatic upgrade, one-click console upgrade, and semi-automatic upgrade using a script. After a new LogListener collection end version is released, users no longer need to manually download the new installation package and perform manual upgrades. Instead, they can schedule an automatic upgrade for a server group in the console or perform a one-click manual upgrade directly on the target servers.
Note:
The LogListener automatic upgrade feature is supported starting from LogListener version 2.5.0 and above. For a better user experience, it is recommended to first upgrade LogListener to a version above 2.5.0 via semi-automatic upgrade. When the LogListener version is lower than 2.8.3, the script-based semi-automatic upgrade feature requires Python 2.7 support. If the version installed on the collection machine is not Python 2.7, you cannot use this method to upgrade. It is recommended to upgrade the Python version or use manual LogListener upgrade. The LogListener automatic upgrade feature does not support direct upgrades from versions below 2.8.3 to version 3.x. To upgrade, first upgrade to version 2.8.6 via semi-automatic upgrade, and then use the automatic upgrade feature. Directions
Automatic Console Upgrade
2. In the left sidebar, select Machine Group Management to go to the Machine Group Management page.
3. Locate the target machine group that requires automatic upgrade, and click . 4. In the pop-up window, enable the LogListener automatic upgrade switch and specify the upgrade time period (default: from the current time to two hours later, such as 23:25 to 01:25).
5. Click OK. The Auto Upgrade column for the target machine group changes to , indicating that enabling automatic LogListener upgrade is successful. Note:
You can set any time period for the auto upgrade, and the system will check if upgrade is needed every day in the specified time period. If the upgrade conditions are met, the auto-upgrade will be performed; otherwise, the operation will be performed.
To perform LogListener automatic upgrade for multiple machine groups, select multiple target machine groups, and then click More Actions > LogListener Automatic Upgrade to perform batch upgrade.
One-Click Console Upgrade
2. In the left sidebar, select Machine Group Management to go to the Machine Group Management page.
3. Locate the target machine group that requires upgrade, click More in the operation column, and then locate and click Manually Upgrade LogListener in the drop-down list.
4. In the pop-up window, select the target machines with Upgrade Status as To be upgraded, and click Manual Upgrade.
The system is upgraded to the latest version by default. When the Upgrade Status is Already the Latest Version, it indicates that the upgrade is successful.
Note:
When the upgrade status shows Update Not Supported, it indicates that one-click LogListener update in the console is not supported. You need to manually download the new version installation package and perform the relevant manual upgrade operation. For details, see LogListener Manual Upgrade. Semi-auto upgrade
Upgrading to the Latest Version of Loglistener with the New Architecture (Version 3.x)
Upgrading to the Latest Version of LogListener with the Legacy Architecture (Version 2.x)
2. Run the following command to complete the upgrade.
./loglistener_operator upgrade --root_dir=${loglistener installation directory} --url=${upgrade package url}
Parameter descriptions:
|
--root-dir | Specifies the installation directory for the new LogListener version. The default value is /usr/local/loglistener. |
--url | Specifies the URL of the installation package for the LogListener to be upgraded. The default value is the URL of the latest LogListener installation package. To specify a version, append "-version number" after "loglistener-linux-x64". For example: the URL of the LogListener installation package for version 3.5.0 is: |
Note:
The following procedure upgrades to the latest 2.x version. To upgrade to the new LogListener architecture (version ≥3.5.0), see the Tab on the left.
1. Run the following command to download the upgrade script.
wget http://mirrors.tencent.com/install/cls/update
2. Run the following command to add permissions.
3. Run the following command to execute the LogListener upgrade script.
./update auto_upgrade --root-dir /usr/local/loglistener --url http://mirrors.tencentyun.com/install/cls/loglistener-linux-x64.tar.gz
Parameter descriptions:
|
--root-dir | Specifies the installation directory for the new LogListener version. The default value is /usr/local/loglistener. |
--url | Specifies the URL of the installation package for the LogListener to be upgraded. The default value is the URL of the latest LogListener installation package. To specify a version, append "-version number" after "loglistener-linux-x64". For example: the URL of the LogListener installation package for version 2.8.7 is http://mirrors.tencent.com/install/cls/test/loglistener-linux-x64-2.8.7.tar.gz. Note: If the specified version does not exist, the download will fail. If the specified version is lower than the currently installed version on the server, the update will not take effect. |