Elastic Compute ServiceElastic Compute ServiceBest PracticesMonitoringDelivering monitoring metrics of ECS instances to VMP
Copy page
Download PDF
Monitoring
Delivering monitoring metrics of ECS instances to VMP
Copy page
Download PDF
Delivering monitoring metrics of ECS instances to VMP
This topic mainly describes how to deliver the monitoring metric information of ECS instances to Volcengine Managed Service for Prometheus (VMP).
What is VMP
Volcengine Managed Service for Prometheus (VMP) is a cloud-native monitoring product of VolcanoEngine. It supports maintenance-free operation, high performance, high stability, and other features. You can quickly deliver the monitoring information of ECS instances into the VMP service to build your new-generation, cloud-native monitoring engine.
Prerequisites
You have enabled VMP service. For details, see Quick start.
Select the "Job management" tab, and click the "Create a job" button to enter the job creation page.
Enter the following job information as instructed.
This practice only describes necessary parameters. Other parameters remain at their default values. Adjust parameters based on your needs. For parameter details, refer to Creating jobs.
Parameter
Description
Sample value
Parameter
Description
Sample value
Job name
Set the job name.
Modify configurations of Cloud Monitor plugin
Command type
Select "Manual input".
Manual input
Command contents
-
Object
Select ECS instances that meet the requirements for you to execute the job by instance name, project, tag, or other information. You can select multiple instances at one time.
tip
You can select up to 200 ECS instances.
-
Click the "Confirm" button to complete the job creation.
After the job is created, the system automatically redirects you to the Job management page. The new job is then executed immediately.
You can install Grafana on a VolcanoEngine ECS instance and view monitoring information on that instance.
warning
To install Grafana, the instance is required to meet the following requirements:
An EIP is associated with the instance. If not associated, follow the guide for associating EIPs to complete the operation.
To install and use Grafana, certain conditions are required to be met. For details, see Installing Grafana.
Since Grafana uses port 3000 for communication by default, make sure that the security group of the instance with Grafana installed has allowed inbound traffic on TCP port 3000. For detailed operations, see Modifying security group rules.
Log in to the instance with Grafana to be installed. For more information, refer to Login overview.
Execute the following commands to install Grafana.
tip
In the example provided in this practice, Grafana 10.2.1 is installed on an Ubuntu instance. For Grafana download links for more operating systems and more Grafana versions, see Downloading Grafana.
In the left-side navigation pane, select "Workspace" to enter the workspace list page.
In the top menu bar, select a target region.
Click the "Create" button, and configure the workspace as follows.
This practice only describes necessary parameters. Other parameters remain at their default values. For detailed parameter descriptions, see Creating workspaces.
Parameter
Description
Sample value
Parameter
Description
Sample value
Region
Deploy the workspace in the same region as the target instance.
China (Beijing)
Workspace name
Specify the workspace name. Data in workspaces with different names is isolated from each other.
ECS2VMP
Basic Auth
Enable the Basic Auth authentication feature.
After this feature is enabled, the workspace supports authentication and authorization via username/password or VolcanoEngine AK/SK for writing and querying data.
To enable the Basic Auth authentication feature, the following information is required for authentication:
username: The username used for Basic Auth authentication.
password: The password used for Basic Auth authentication.
Confirm password: Re-enter the password used for Basic Auth authentication to ensure the two entries are the same.
-
Workspace instance type
In this practice, Standard Edition is used.
Standard Edition
After you confirm the configuration information, select the "I have read and agreed to Volcengine Managed Service for Prometheus Dedicated Service Terms" checkbox.
Click the "Create Now" button to complete the creation.
In the left-side navigation pane, select "Integration Center", and select the "Product Service" tab.
Click the "Create Integration Task" button in the "ECS instance" tab to enter the process for creating an integration task for the ECS instance.
Based on the instructions, click the "To authorize" button.
On the "Cross-service access request" page, click the "Authorize now" button to authorize VMP to use ECS instance metrics.
After authorization is completed, on the Create Integration Task page, click the button on the right of the "To authorize" button to update the authorization result.
Enter the following task information as instructed.
Parameter
Description
Sample value
Parameter
Description
Sample value
Task name
Set the integration task name. Chinese, English uppercase and lowercase letters, numbers, and underscores _ are supported. Value range: 1 ~ 40 characters.
ECS2VMP
Workspace
Choose a created VMP workspace.
ECS2VMP
ECS VPC
Select the VPC where the ECS instance resides.
vpc-hs032xxxx
Security group
Select the security group for the managed collector and allow the managed collector to access resources in your VPC. Multiple selection is supported.
sg-os23sdaxxxx
Subnet
Choose the VPC subnet for service discovery. Then, the system performs ECS service discovery under the selected subnet and monitors all ECS instances that meet the requirements. Multiple selection is supported.
sub-2ds3xxxx
Job configuration
Configure information such as the VMP collection interval, collection timeout period, collection protocol, and port number for collection metrics. For details, see Configuring integration tasks.
Click the "Confirm" button to complete the integration task creation.
Step 5: Configure Grafana
Enter the Grafana management page to log in.
Log in via the target instance
If the target instance has GUI installed, you can access the Grafana management page on the instance.
Select "Basic authentication" and enter the Basic Auth information you entered for creating the workspace.
Click the "Save & test" button at the bottom of the page.
If the following output is displayed, the workspace is associated with Grafana.
(Optional) Configure monitoring information panes (Panel).
tip
Panels used in this section are for reference only. You can use them or customize monitoring panels based on your needs.
Download the file "ECS cluster monitoring dashboard - 20240120.json".
ECS cluster monitoring dashboard - 20240120.json
In the left directory tree, select "Home" to return to the Grafana home page.
Click the "+" button in the upper right corner, and then click the "Import dashboard" button.
On the "Import dashboard" page, click the "Upload dashboard JSON file" button, and select the downloaded JSON file of the ECS cluster monitoring dashboard from your local device.
In the "VMP" module, select the Prometheus data source you created, and then click the "Import" button.
You can check the operation result in Grafana.
Appendix
Command for modifying Cloud Monitor plugin configurations
You can execute this command to modify Cloud Monitor plugin configurations of ECS instances, enable the VMP monitoring port, and restart the plugin.