All Products
Search
Document Center

Elasticsearch:Use Heartbeat to check ICMP and HTTP services

Last Updated:Mar 27, 2026

Heartbeat is a lightweight daemon that periodically checks whether your services are reachable and generates visual charts in Kibana. This topic walks you through configuring an ICMP monitor and an HTTP monitor, deploying Heartbeat on an Elastic Compute Service (ECS) instance, and viewing the collected uptime data.

Background information

Heartbeat checks whether services are reachable — not whether they are running. Unlike most Beats shippers that must be installed on edge nodes, Heartbeat can be installed on a separate machine or even outside the network where the monitored services are deployed.

Heartbeat supports three monitor types:

Monitor type

What it checks

Notes

ICMP monitor

Host reachability using ICMPv4 or ICMPv6 Echo Requests

Tells you whether a host is up and connected to the network, but does not tell you whether a service on that host is running. Requires root privileges.

TCP monitor

Whether a service is accessible by sending and receiving payloads over TCP

Supports SSL, Transport Layer Security (TLS), and some proxy settings.

HTTP monitor

Whether a service returns expected status codes, response headers, or response content over HTTP

Supports SSL, TLS, and some proxy settings.

Prerequisites

Before you begin, make sure you have:

Set up a Heartbeat shipper

  1. Log on to the Alibaba Cloud Elasticsearch console.

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

  3. In the Create Shipper section, click Heartbeat.

  4. Install and configure the shipper. For more information about the installation steps and YAML configuration file, see Collect the logs of an ECS instance and Prepare a YAML configuration file for a shipper. Configure the heartbeat.monitors parameter in heartbeat.yml to define your monitors. The following example configures one ICMP monitor and one HTTP monitor:

    1. type — The monitor type. This example uses icmp and http.

    2. schedule — When to run the monitor. '*/5 * * * * * *' runs the check at fixed 5-second intervals (for example, 10:00:00, 10:00:05). '@every 10s' runs the check every 10 seconds from the time Heartbeat starts.

    3. hosts — The servers to ping (ICMP monitor).

    4. urls — The URLs to check (HTTP monitor).

    5. check.response.status — The expected HTTP status code. Setting this to 200 marks the service as healthy only when it returns 200. The HTTP monitor can also check response headers and response body content — see the open source Heartbeat documentation for all available parameters.

    - Selecting Enable Kibana Monitoring enables Heartbeat service monitoring in the Kibana console. - Selecting Enable Kibana Dashboard generates charts in Kibana automatically — no YAML file configuration needed. Because Alibaba Cloud Kibana is deployed in a VPC, enable the Private Network Access feature on the Kibana Configuration page first. For more information, see Configure a public or private IP address whitelist for Kibana.
    heartbeat.monitors:
    - type: icmp                          # 1
      schedule: '*/5 * * * * * *'        # 2
      hosts: ["47.111.xx.xx"]            # 3
    - type: http                          # 1
      urls: ["https://es-cn-xxxxx.kibana.elasticsearch.aliyuncs.com:5601/"]  # 4
      schedule: '@every 10s'             # 2
      check.response.status: 200         # 5

    heartbeat配置

  5. Select the ECS instance on which to install the shipper. The instance must meet all prerequisites listed above.

  6. Click Start. A Start Shipper message appears.

  7. Click Back to Beats Shippers. In the Manage Shippers section of the Beats Data Shippers page, find your shipper and wait for the state to change to Enabled 1/1.

  8. Click View Instances in the Actions column. In the View Instances panel, confirm that Installed Shippers shows Normal Heartbeat. This confirms the shipper is running on the ECS instance.

View the results

  1. Log on to the Kibana console. For more information, see Log on to the Kibana console.

  2. In the left-side navigation pane, click Discover. Select heartbeat-\* from the drop-down list in the upper-left corner, then set a time range in the upper-right corner to view the data Heartbeat collected during that period. > Tip: If no data appears, expand the time range.

    Heartbeat收集的数据

  3. In the left-side navigation pane, click Dashboard.

  4. In the Dashboards section, click Heartbeat HTTP monitoring. Set a time range in the upper-right corner to view HTTP status statistics for that period.

    HTTP监控状态图