- What's New
- Function Overview
- Service Overview
- Getting Started
- User Guide
- Best Practices
-
API Reference
- Before You Start
- API Overview
- Calling APIs
- Getting Started
-
APIs
- AS Groups
- AS Configurations
- Instances
-
AS Policies
- Creating an AS Policy
- Creating an AS Policy (V2)
- Modifying an AS Policy
- Modifying an AS Policy (V2)
- Querying AS Policies Bound to an AS Group
- Querying AS Policies Bound to a Scaling Resource (V2)
- Querying AS Policies (V2)
- Querying an AS Policy
- Querying an AS Policy (V2)
- Executing, Enabling, or Disabling an AS Policy
- Deleting an AS Policy
- Batch Managing AS Policies
- AS Policy Execution Logs
- Scaling Action Logs
- Quotas
- Notifications
- Lifecycle Hooks
- Tags
- API Version Query
- Application Examples
- Permissions Policies and Supported Actions
- Appendix
- Change History
- SDK Reference
-
FAQs
-
General
- What Are Restrictions on Using AS?
- Must I Use AS Together With ELB and Cloud Eye?
- Is AS Billed?
- Will an Abrupt Change in Monitoring Metric Values Trigger an Unnecessary Scaling Action?
- How Many AS Policies and AS Configurations Can I Create and Use?
- Can AS Automatically Scale Up or Down vCPUs, Memory, and Bandwidth of ECSs?
- What Is an AS Quota?
- How Do I Fix the Error "The key pair does not exist" When I Connect to an Instance?
- What Types of EIP and Shared Bandwidths Can Be Adjusted by AS?
- What Types of ECS and HECS Instances Can Be Scaled by AS?
- If the OS of an ECS Instance in an AS Group Is Upgraded, Can AS Automatically Add Instances with the Newest OS During the Next Scale-out Action?
- Can AS Add Yearly/Monthly ECS Instances When It Scales Out an AS Group?
- Can AS Increase Bandwidths as Required?
- AS Group
-
AS Policy
- How Many AS Policies Can I Enable?
- What Are the Conditions to Trigger an Alarm-based AS Policy?
- What Is a Cooldown Period and Why Is It Required?
- Can AS Scale Capacity Based on Custom Monitoring by Cloud Eye?
- What Monitoring Metrics for an AS Group Will Be Affected If VM Tools Are Not Installed on the Instances in the Group?
- What Can I Do If an AS Policy Fails to Be Enabled?
- How Do I Install the Agent on Instances in an AS Group to Use Agent Monitoring Metrics?
-
Instance
- How Do I Prevent Instances Manually Added to an AS Group from Being Automatically Removed?
- When an Instance Is Removed from an AS Group and Deleted, Is the Application Data Saved?
- Can I Add Yearly/Monthly ECS Instances to an AS Group?
- Can AS Automatically Delete Instances Added Based on an AS Policy When They Are Not Required?
- What Is the Expected Number of Instances?
- How Do I Delete an ECS Instance Created in a Scaling Action?
- Will ECS Instances Be Deleted If They Become Unhealthy?
- How Do I Handle Unhealthy Instances in an AS Group?
- Why Instances in an AS Group Keep Failing Health Checks and Getting Deleted and Recreated?
- How Do I Prevent Instances from Being Automatically Removed from an AS Group?
- Why Is an Instance that Was Removed from an AS Group and Deleted Still Displayed in the ECS List?
- Do I Need to Bind an EIP to an Instance Before I Manually Add the Instance to an AS Group?
- Can I Apply the Configurations of an Existing Instance in an AS Group to Instances to Be Added in the Future?
- Will the System Bind a New EIP or an Existing One a Newly Added ECS Instance?
-
Others
- How Can I Automatically Deploy My Application on an Instance?
- How Does Cloud-Init Affect the AS Service?
- Why Can't I Use a Key File to Log In to an ECS?
- Do I Need to Configure an EIP in an AS Configuration When a Load Balancer Has Been Enabled for an AS Group?
- How Do I Enable Automatic Initialization of EVS Disks on Instances that Have Been Added to an AS Group During Scaling Actions?
-
General
- Videos
How Do I Install the Agent on Instances in an AS Group to Use Agent Monitoring Metrics?
Scenarios
If an AS group uses an alarm-based scaling policy, you can install the Agent on the instances to better monitor the AS group. Compared with basic monitoring, Agent monitoring (OS monitoring) provides proactive, fine-grained, system-level monitoring of instances. This section describes how to install the Agent on instances.
Procedure
- Log in to the management console and click Elastic Cloud Server under Compute.
The Elastic Cloud Server page is displayed.
- Create an ECS and install the Agent.
For more information, see Agent Installation and Configuration.
- After installing the Agent plug-in, log in to the Cloud Eye console, choose Server Monitoring > Elastic Cloud Server, and ensure that the Agent is running and collecting the monitoring metrics.
Figure 1 Checking the Agent statusFigure 2 Viewing Agent monitoring metrics
- Add the AK/SK pair to the conf.json configuration file of the ECS.
- Click your username, choose My Credentials > Access Keys, and obtain the AK/SK pair.
- If you have created an access key, obtain the AccessKey value and the SecretKey value in the credentials.csv file you obtained when you create the access key.
- If no access keys are available, click Create Access Key to create one. Save the credentials.csv file and obtain the AccessKey value and the SecretKey value in it.
- Log in to the ECS and use cd /usr/local/telescope/bin to go to the Agent installation directory.
- Run vi conf.json to open the configuration file and enter the obtained AK/SK pair.
If the Agent was installed during ECS creation, the AK/SK pair was added during user data injection. You only need to check the AK/SK pair in this step.
- Press Esc and enter :wq to save the configuration and exit.
- Click your username, choose My Credentials > Access Keys, and obtain the AK/SK pair.
- Go to the Image Management Service page and create a private image ces-agent-test for this ECS. For details, see Creating a Private Image.
Figure 3 Creating a private image
- Go to the Auto Scaling page and use the private image created in step 5 to create an AS configuration.
Figure 4 Selecting the private image
Click Private image for Image, select ces-agent-test from the drop-down list, and set other parameters as required.
- Use the AS configuration created in step 6 to create an AS group.
- Add an AS policy for the AS group. Set Policy Type to Alarm and Trigger Condition to an Agent monitoring metric, such as (Agent) Memory Usage.
Figure 5 Selecting a trigger condition
- Manually add the ECS created in step 2 to the AS group.
- Perform the following operations to check whether the Agent monitoring has taken effect:
- Verify that the Agent monitoring metric is displayed on the Monitoring tab of the AS group details page.
- When the alarm threshold is reached, verify that the alarm policy has triggered scaling actions and instance are added or removed.
- The Agent monitoring data is collected from all instances that are automatically added to the AS group.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.