You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

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.​
  • The ECS instance and VMP service reside in the same region.​
  • The ECS instance has the following plugins installed:​
  • Cloud Monitor plugin. If not installed, follow the guide for installing plugins to complete the installation.​
Procedure​
Step 1: Modify configurations of Cloud Monitor plugin​
  1. Log in to the cloud assistant console.​
  1. Select the "Job management" tab, and click the "Create a job" button to enter the job creation page.​
  1. 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​
    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.​
    -​
    ​
  1. Click the "Confirm" button to complete the job creation.​
  1. After the job is created, the system automatically redirects you to the Job management page. The new job is then executed immediately.​
  1. You can follow the guide for viewing job execution results to confirm whether the job has been successfully executed on each target instance.​
Step 2: Install Grafana​
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:​
  • 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.​
  1. Log in to the instance with Grafana to be installed. For more information, refer to Login overview.​
  1. 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.​
  • ​
    sudo apt-get update​
    sudo apt-get install -y adduser libfontconfig1 musl​
    wget https://dl.grafana.com/enterprise/release/grafana-enterprise_10.2.1_amd64.deb​
    sudo dpkg -i grafana-enterprise_10.2.1_amd64.deb​
    ​
  1. After the installation is complete, you can execute the following command to check whether Grafana is started as expected.​
  • ​
    systemctl status grafana-server​
    ​
  • ​​​
Step 3: Create a workspace​
  1. Log in to the VMP console.​
  1. In the left-side navigation pane, select "Workspace" to enter the workspace list page.​
  1. In the top menu bar, select a target region.​
  1. 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​
    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​
    ​
  1. After you confirm the configuration information, select the "I have read and agreed to Volcengine Managed Service for Prometheus Dedicated Service Terms" checkbox.​
  1. Click the "Create Now" button to complete the creation.​
Step 4: Create an integration task​
  1. Log in to the VMP console.​
  1. In the top menu bar, select a target region.​
  1. In the left-side navigation pane, select "Integration Center", and select the "Product Service" tab.​
  1. Click the "Create Integration Task" button in the "ECS instance" tab to enter the process for creating an integration task for the ECS instance.​
  1. Based on the instructions, click the "To authorize" button.​
  1. On the "Cross-service access request" page, click the "Authorize now" button to authorize VMP to use ECS instance metrics.​
  1. 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.​
  1. Enter the following task information as instructed.​
  • ​
    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.​
    ​
    ​
  1. Click the "Confirm" button to complete the integration task creation.​
Step 5: Configure Grafana​
  1. 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.​
  1. Log in to the target instance. For more information, refer to Logging in to instances.​
  1. Visit the following link in the instance browser.​
  • ​
    http://localhost:3000​
    ​
  1. Enter the default username admin and password admin, and click the "Log in" button.​
  • ​​​
  • Log in remotely​
  • If the target instance does not have GUI installed, you can log in remotely from a server that has GUI installed and can access the Internet.​
  1. Log in to the remote server.​
  1. Visit the following link in the browser on the remote server.​
  • ​
    http://< Public IP of the target instance >:3000​
    ​
  1. Enter the default username admin and password admin, and click the "Log in" button for login.​
  • ​​​
  1. Enter the new login password and click the "Submit" button to complete the password change.​
  • ​​​
  1. In the left-side navigation pane of the Grafana home page, select "Connections > Data sources".​
  • ​​​
  1. On the "Data sources" page, click the "Add data source" button to add a data source.​
  • ​​​
  1. On the "Add data source" page, click "Prometheus".​
  • ​​​
  1. After the data source is successfully added, on the "prometheus" page, configure information as follows.​
  • ​
    Parameter​
    Description​
    Sample value​
    Connection​
    Enter the Query URL of the VMP workspace in Prometheus server URL *. For detailed instructions, see Obtaining Remote Write and Query addresses.​
    ​
    Authentication​
    Select "Basic authentication" and enter the Basic Auth information you entered for creating the workspace.​
    ​
    ​
  • ​​​
  1. Click the "Save & test" button at the bottom of the page.​
  • If the following output is displayed, the workspace is associated with Grafana.​
  • ​​​
  1. (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.​
  1. Download the file "ECS cluster monitoring dashboard - 20240120.json".​
  • ​
    ​
    ECS cluster monitoring dashboard - 20240120.json
    ​
    ​
  1. In the left directory tree, select "Home" to return to the Grafana home page.​
  1. Click the "+" button in the upper right corner, and then click the "Import dashboard" button.​
  • ​​​
  1. 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.​
  • ​​​
  1. In the "VMP" module, select the Prometheus data source you created, and then click the "Import" button.​
  • ​​​
  1. 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.​
​
#!/bin/bash​
# set Prometheus = true​
sed -i 's/Prometheus: false/Prometheus: true/w /dev/stdout' /usr/local/cloud-monitor-agent/config.yaml | grep -q .​
# returns 0 when substitutions have been made, and 1 when no match is found or file not found​
if [ $? -eq 0 ]; then​
systemctl restart cloud-monitor-agent​
fi​
​
​
Last updated: 2026.06.18 17:49:51