All Products
Search
Document Center

Elasticsearch:Collect system and Nginx service data with Metricbeat

Last Updated:Jun 15, 2026

Use a Metricbeat shipper to collect system metrics (CPU usage, memory, disk I/O, and network I/O) and Nginx service data, then visualize the data in Kibana dashboards.

Prerequisites

The following requirements must be met:

Collect system data with Metricbeat

  1. Log on to the Alibaba Cloud Elasticsearch console.

  2. In the navigation pane on the left, click Beats Data Shippers.

  3. In the Create Shipper section, click Metricbeat.

  4. Install and configure the shipper.

    Configure the shipper by following Use Filebeat to collect logs from an ECS instance and Shipper YML Configuration. The following figure shows the configuration used in this topic.Metricbeat

    Note
    • Select Enable Kibana Monitoring to monitor the Metricbeat service on the Kibana console.

    • Select Enable Kibana Dashboard to auto-generate Kibana dashboards without extra YML configuration. Kibana runs in a VPC, so enable private network access first. Connect to an instance by using Kibana.

    • The system module is enabled by default. No configuration is needed for the Shipper YML Configuration.

  5. Click Next.

  6. Select the target ECS instance.

    Note

    If this is your first shipper, click Authorize Now to grant Elasticsearch permission to access your ECS instances.

  7. Start the shipper and check its installation status.

    1. Click Start.

      After a successful startup, the Start Shipper dialog box appears.

    2. Click Back to Beats Shippers. On the Beats Data Shippers page, find the Metricbeat shipper in the Manage Shippers section.

    3. Wait until the Shipper Status changes to Enabled. Then, in the Actions column, click View Instances.

    4. On the View Instances page, verify that the Installed Shippers is Normal Heartbeat.

  8. Verify the results.

    1. Log on to the Kibana console of your Elasticsearch instance.

    2. In the navigation pane on the left, click Dashboard.

    3. In the Dashboard list, click [Metricbeat System] Overview. The monitoring dashboard for your Metricbeat system is displayed.

      Metricbeat system monitoring dashboard

Collect Nginx service data with Metricbeat

Prerequisite: Enable stub_status for your Nginx service. The ngx_http_stub_status_module counts requests received and processed by Nginx. Use the stub_status configuration block shown below. Modify the listener port of web services such as Nginx and Tomcat on an ECS instance that runs Linux.

location /status {
           stub_status on;
           access_log off;
        }
Important

The server_status_path configured in the metricbeat.yml file must match the path for status in the nginx.conf file.

  1. Log on to the Alibaba Cloud Elasticsearch console.

  2. In the navigation pane on the left, click Beats Data Shippers.

  3. In the Create Shipper section, click Metricbeat.

  4. Install and configure the shipper.

    Configure the shipper by following Use Filebeat to collect logs from an ECS instance and Shipper YML Configuration.

    Add the following configuration to metricbeat.yml.

    image

    metricbeat.modules:
    - module: nginx
      metricsets: ["stubstatus"]
      enabled: true
      period: 10s
      # Nginx hosts
      hosts: ["http://121.41.**.**"]
      # Path to server status. Default server-status
      server_status_path: "status"
    Note
    • Select Enable Kibana Monitoring to monitor the Metricbeat service on the Kibana console.

    • Select Enable Kibana Dashboard to auto-generate Kibana dashboards without extra YML configuration. Kibana runs in a VPC, so enable private network access first. Connect to an instance by using Kibana.

  5. Click Next.

  6. Select the target ECS instance.

    Select ECS instance for shipper installation

    Note

    If this is your first shipper, click Authorize Now to grant Elasticsearch permission to access your ECS instances.

  7. Start the shipper and check its installation status.

    The steps are the same as in Collect system data using Metricbeat.

  8. Verify the results.

    1. Navigate to <Nginx hosts>/status in a browser to view the monitoring page.

      Nginx status monitoring page

    2. Log on to the Kibana console of your Elasticsearch instance.

    3. In the navigation pane on the left, click Dashboard.

    4. In the Dashboard list, click [Metricbeat Nginx] Overview.

      Nginx monitoring dashboard