All Products
Search
Document Center

ECS Metrics Collector for SAP Deployment Guide

Last Updated: Jan 07, 2019

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.

mc-01

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.

  1. Log on to the ECS console.
  2. 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. ram-03

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 ram-07

The two policies authorize the Metrics Collector to only read ECS information and only read CloudMonitor resources.

9.Click OK to complete policy. ram-09

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.ram-10

  • Select the RAM role you have created.ram-11

  • 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

linux

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.

  1. wget https://bootstrap.pypa.io/get-pip.py
  2. python get-pip.py
  3. pip -V  #Check the pip version
  1. 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.metrics-1

Verify the installation of Metrics Collector

3.Verify the ECS Metrics Collector service.

  1. systemctl status ecs_metrics_collector

metrics-2

4.Check whether the watching task and automatic update task are configured in crontab and whether the running log is recorded.

  1. cat /etc/cron.d/ecs_metrics_collector
  2. cat /var/log/ecs_metrics_collector/watchmen.log

metrics-3

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.

  1. curl localhost:8888 | vim -

curl

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.

curl

More commands

For more commands related to Metrics Collector, run the aliyun_installer --h command.

Based on Windows

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.

  1. cd "C:\ProgramData\aliyun\assist\[1.0.0.107]"
  2. aliyun_installer.exe -l
  3. aliyun_installer.exe -i ecs_metrics_collector

Select the ID of the latest version for package_id.

win_mc_install

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.ecs_service_status

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.

metrics_task

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:8888A 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.curl

Uninstall the ECS Metrics Collector

  1. Log on to your SAP ECS instance as an administrator. Switch to the installation directory and double-click uninst.exe.metrics_uninstall_01

More commands

For more commands related to Metrics Collector, run the aliyun_installer.exe --h command.

FAQ

  1. Failed to start ECS Metrics Collector for SAP

    Symptom

  • An error occurred while checking the status of the service ecs_metrics_collector

qa_1_01

  • Use the command journalctl -xe to view the system log. The following message appears: ImportError: No module named pytz

qa_1_02

Resolution

  • Manual installing the pytz module
  1. pip installing pytz

qa_1_02

  • Restart and verify the service status of ecs_metrics_collector
  1. systemctl restart ecs_metrics_collector
  2. systemctl status ecs_metrics_collector

qa_1_02