- Overview
- Create a RAM role
- Configure the RAM role
- Install the SAP Host Agent
- Install and uninstall the ECS Metrics Collector
- FAQ
Version Control
Version | Revision Date | Types Of Changes | Effective Date |
---|---|---|---|
1.0 | 2018/5/31 | ||
1.1 | 2018/6/11 | Description of installation preparations is updated. | 2018/6/12 |
1.2 | 2019/1/7 | 1. Update Frequently Asked Questions 2. Update RAM2.0 Operating Instructions |
2019/1/7 |
Overview
The ECS Metrics Collector is a monitor agent that used by the SAP system on the cloud platform to collect required VM configurations and physical resource usage information.
When the SAP system runs on ECS, the SAP host agent obtains SAP system monitoring information (such as operating system, network, storage, and SAP architecture information) through the metadata service and open APIs, and provides the information to SAP application for event analysis and system performance analysis.
You need to install Metrics Collector for SAP for each ECS instance (database or application) running the SAP system.
The following figure is the overall architecture of Metrics Collector.
Configure the RAM role
To monitor the ECS Metrics Collector, you need to configure the certain RAM role and access rights.
Note: The configuration of RAM role is permanently valid for your account.
For more information about RAM role configuration, see Use the instance RAM role on the console.
- Log on to the ECS console.
- Click Resource Access Management in the left navigation bar.
You need to activate the RAM function if you use this function first time.
3.Open the RAM console, select RAM Roles, and click Create RAM Role.
Please note: The following is an example based on the RAM version 2.0. The description of the old version may be different
7.After the role is created, click Add permissions to assign necessary policies to your RAM role. Select the policy names AliyunECSReadOnlyAccess and AliyunCloudMonitorReadOnlyAccess
The two policies authorize the Metrics Collector to only read ECS information and only read CloudMonitor resources.
9.Click OK to complete policy.
Configure RAM role
Attach the created RAM role to your SAP ECS instance.
Open the ECS console and click Instance to find out your ECS instance.
Click More and select Bind/Unbind RAM Role from the drop-down list.
Select the RAM role you have created.
Click OK to attach the role.
For more information about RAM binding and unbinding, see Use the instance RAM role on the console
Install the SAP Host Agent
You need an SAP market place account for logon.
For the suggested version of SAP Host Agent, see 1031096 - Installing Package SAPHOSTAGENT
Install and uninstall the ECS Metrics Collector
The installation of ECS Metrics Collector and the data reading from open APIs require a connection to the Internet. External network access needs to be combined with cloud security products to protect data and network security. For details, please refer to Cloud Security Solution
Based on Linux
Install the ECS Metrics Collector
1.Log on to the SAP ECS instance as a root user.
To use the root rights, you need sudo
, so you must belong to the sudo group.
2.Install the ECS Metrics Collector by using the Cloud Assistant as follows:
The Metrics Collector needs the support of python. If you have not installed pip for the ECS instance, install it first.
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip -V #Check the pip version
aliyun_installer -i ecs-metrics-collector
Enter the ID of the latest version for package_id. In this example, the latest version 8 is used.
Verify the installation of Metrics Collector
3.Verify the ECS Metrics Collector service.
systemctl status ecs_metrics_collector
4.Check whether the watching task and automatic update task are configured in crontab and whether the running log is recorded.
cat /etc/cron.d/ecs_metrics_collector
cat /var/log/ecs_metrics_collector/watchmen.log
The two tasks are automatically added to crontab during the installation of ECS Metrics Collector. The automatic update task checks for available updates of ECS Metrics Collector on the Cloud Assistant server every hour. If an update of the latest version is detected, an automatic upgrade is performed.
Check the collected metric data
5.Verify the collected data.
curl localhost:8888 | vim -
Uninstall the ECS Metrics Collector
Log on to your SAP ECS instance as a root user.
Run the aliyun_installer -u ecs-metrics-collector command to uninstall the ECS Metrics Collector
.
More commands
For more commands related to Metrics Collector, run the aliyun_installer --h
command.
Based on Windows
1.Log on to your SAP ECS instance as an administrator.
2.Install the ECS Metrics Collector by using the Cloud Assistant. Right-click the Start menu, right-click CMD, and choose Run as Administrator to open the CMD window.Switch to the directory of Cloud Assistant to perform the installation.
The latest version of Cloud Assistant is 1.0.0.107. Modify the directory name according to the latest version.
cd "C:\ProgramData\aliyun\assist\[1.0.0.107]"
aliyun_installer.exe -l
aliyun_installer.exe -i ecs_metrics_collector
Select the ID of the latest version for package_id.
Verify the installation of ECS Metrics Collector
3.Verify the ECS Metrics Collector service.
Right-click the taskbar and choose Task Manager > Service. Check and ensure that the Ecs metrics collector service status is running.
4.Right-click the Start menu, choose Run, enter taskschd.msc, and press Enter. Open the task schedule program and click Task Scheduler Library to check that the update detection task has been scheduled.
A task is created during the installation of ECS Metrics Collector to check for version updates of ECS Metrics Collector on the Cloud Assistant server every hour. If an update of the latest version is detected, an automatic upgrade is performed.
Check the collected metric data
5.Verify the collected data.
Open the browser and enter http://localhost:8888
A page similar to the following is displayed. If all parameters have values, the configuration is successful. If a value is abnormal, check the RAM role configuration.
Uninstall the ECS Metrics Collector
- Log on to your SAP ECS instance as an administrator. Switch to the installation directory and double-click uninst.exe.
More commands
For more commands related to Metrics Collector, run the aliyun_installer.exe --h
command.
FAQ
Failed to start ECS Metrics Collector for SAP
Symptom
- An error occurred while checking the status of the service ecs_metrics_collector
- Use the command journalctl -xe to view the system log. The following message appears: ImportError: No module named pytz
Resolution
- Manual installing the pytz module
pip installing pytz
- Restart and verify the service status of ecs_metrics_collector
systemctl restart ecs_metrics_collector
systemctl status ecs_metrics_collector