# 使用 Homebrew, apt, Nix, winget 安装 heartbeat

查看 heartbeat 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:heartbeat
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install heartbeat
```

  证据: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install heartbeat
```

  证据: Debian stable package indexes: heartbeat from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#heartbeat
```

  证据: nixpkgs package indexes: heartbeat from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

### Windows

- winget (92%):

```sh
winget install --id HeartbeatChat.Heartbeat -e
```

  证据: Windows Package Manager source index: HeartbeatChat.Heartbeat from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:heartbeat
- **软件包管理器:** Homebrew
- **版本:** 9.4.4
- **来源摘要:** Lightweight Shipper for Uptime Monitoring
- **主页:** <https://www.elastic.co/beats/heartbeat>
- **仓库:** <https://github.com/elastic/beats>
- **最后更新:** 2026-07-23T07:28:54Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- heartbeat (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 9.4.4
## 项目历史与用法

Elastic Heartbeat is a lightweight Beat for uptime monitoring. It runs active probes against HTTP, TCP, and ICMP targets and ships availability and response-time events into the Elastic Stack.

### 项目历史

Heartbeat belongs to Elastic Beats, a family of lightweight Go data shippers for Elasticsearch and Logstash. The Beats repository was created in 2014, and Heartbeat later joined Filebeat, Metricbeat, Packetbeat, Winlogbeat, and related Beats as the service-availability member of that family.

Elastic's November 2018 announcement says Heartbeat was introduced in beta in January 2017 and reached general availability with Elastic Stack 6.5. The same post presents Heartbeat as a lightweight shipper designed for uptime monitoring, configured by a list of URLs or endpoints to check and report to Elasticsearch.

The Heartbeat reference describes the core model: install a lightweight daemon on a remote server, define monitors, schedule checks, and send events about whether services are reachable. Over time, Heartbeat became tied to Kibana's Uptime experience and later to Elastic's broader observability and synthetic-monitoring story.

### 采用历史

Heartbeat adoption followed Elastic Stack operators who wanted uptime data in the same Elasticsearch and Kibana environment as logs, metrics, packet data, and APM traces. The launch article emphasizes combining Heartbeat with Metricbeat, Filebeat, and APM to triage outages from one operational data store.

The official product page positions Heartbeat for testing services from inside or outside a network, pinging ICMP, TCP, and HTTP targets, using TLS, authentication, proxies, and dynamically loaded monitor definitions. That made it useful for infrastructure teams already standardized on Elastic ingestion and dashboards.

Elastic later moved many ingestion workflows toward Elastic Agent and Synthetic Monitoring, but the traditional Heartbeat binary and heartbeat.yml workflow remain documented for lightweight TCP, HTTP, and ICMP monitors configured by operators.

### 使用方式

Operators configure `heartbeat.yml` with monitor entries, each declaring a type such as icmp, tcp, or http, a set of hosts or URLs, and a schedule. Heartbeat periodically probes each target and sends events to Elasticsearch or another configured output.

Common workflows include checking whether a website returns an expected status code or body, verifying that a TCP service accepts a connection or payload exchange, confirming host reachability by ICMP, loading dashboards, and alerting on availability or latency changes in Kibana.

The command-line package also includes setup and test commands shared by Beats, plus keystore support for secrets. The batch's curated config and credentials paths reflect Elastic's documented directory layout conventions for heartbeat.yml and heartbeat.keystore.

### 为什么软件包爱好者会关心

Heartbeat is package-significant because it is an observability agent: admins expect it to install cleanly, run as a service, read config from predictable paths, and keep secrets in a keystore. Those operational details are as important as the executable itself.

In package-manager terms, it is also part of the Elastic Beats era, when small single-purpose shippers were packaged independently. Installing only Heartbeat gave an operator uptime probes without deploying the whole Elastic Agent stack or writing custom monitoring scripts.

### 时间线

- 2014-02: Elastic Beats repository created.
- 2017-01: Heartbeat introduced in beta according to Elastic's GA announcement.
- 2018-11: Elastic Stack 6.5 announced Heartbeat general availability.
- 2018-11: Elastic Uptime solution launched based on Heartbeat.
- 2019: Beats changelog entries show Heartbeat-specific uptime and SSL metadata fixes in the 6.8 series.
- 2021: Beats changelog entries show Heartbeat synthetics and browser-monitoring work in the 7.x series.
- 2024: Elastic docs preserve the Heartbeat reference alongside migration guidance to Elastic Agent.

### Related projects

- Filebeat, Metricbeat, Packetbeat, Winlogbeat, Auditbeat, and Functionbeat are sibling Beats in the Elastic repository.
- Elasticsearch stores Heartbeat events, while Kibana provides dashboards, Uptime views, alerting, and visualization.
- Logstash can be used as an output path between Beats and Elasticsearch.
- Elastic Agent and Synthetic Monitoring are related successors or broader deployment models for many use cases.
- Metricbeat and APM are often combined with Heartbeat data during outage triage.

### 来源

- <https://api.github.com/repos/elastic/beats>
- <https://github.com/elastic/beats>
- <https://raw.githubusercontent.com/elastic/beats/master/CHANGELOG.asciidoc>
- <https://raw.githubusercontent.com/elastic/beats/master/heartbeat/README.md>
- <https://raw.githubusercontent.com/elastic/beats/master/heartbeat/docs/overview.asciidoc>
- <https://www.elastic.co/beats/heartbeat>
- <https://www.elastic.co/blog/elastic-uptime-monitoring-solution-released>
- <https://www.elastic.co/blog/uptime-monitoring-with-heartbeat-and-the-elastic-stack>
- <https://www.elastic.co/docs/reference/beats/heartbeat>
- <https://www.elastic.co/docs/reference/beats/heartbeat/configuration-heartbeat-options>
- <https://www.elastic.co/docs/reference/beats/heartbeat/configuring-howto-heartbeat>


## 安全说明

formula declares a Homebrew service.

- **Geiger 风险:** orange / 中
- formula declares a Homebrew service


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Linux: /etc/heartbeat/heartbeat.yml
- Unix: {path.config}/heartbeat.yml, {path.home}/heartbeat.yml, {extract.path}/heartbeat.yml

## Credential files

- Linux: /var/lib/heartbeat/heartbeat.keystore
- Unix: {path.data}/heartbeat.keystore
## 其他软件包管理器记录

- Debian apt - heartbeat - 1:3.0.6-17: normalized package name match | Debian stable package indexes: heartbeat from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Subsystem for High-Availability Linux | http://www.linux-ha.org/
- Debian apt - heartbeat-dev - 1:3.0.6-17: normalized package name match | Debian stable package indexes: heartbeat-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Subsystem for High-Availability Linux - development files | http://www.linux-ha.org/
- Debian apt - libheartbeat2-dev - 1:3.0.6-17: normalized package name match | Debian stable package indexes: libheartbeat2-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Subsystem for High-Availability Linux (development files) | http://www.linux-ha.org/
- Debian apt - libheartbeat2t64 - 1:3.0.6-17: normalized package name match | Debian stable package indexes: libheartbeat2t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Subsystem for High-Availability Linux (libraries) | http://www.linux-ha.org/
- Nix - heartbeat: normalized package name match | nixpkgs package indexes: heartbeat from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - heartbeat - 1:3.0.6-14.1ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: heartbeat from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Subsystem for High-Availability Linux | http://www.linux-ha.org/
- Ubuntu apt - heartbeat-dev - 1:3.0.6-14.1ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: heartbeat-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Subsystem for High-Availability Linux - development files | http://www.linux-ha.org/
- Ubuntu apt - libheartbeat2-dev - 1:3.0.6-14.1ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libheartbeat2-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Subsystem for High-Availability Linux (development files) | http://www.linux-ha.org/
- Ubuntu apt - libheartbeat2t64 - 1:3.0.6-14.1ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libheartbeat2t64 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Subsystem for High-Availability Linux (libraries) | http://www.linux-ha.org/
- winget - HeartbeatChat.Heartbeat: normalized package name match | Windows Package Manager source index: HeartbeatChat.Heartbeat from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

View the package source record on GitHub. [combined/heartbeat.yml](https://github.com/mxcl/pkgdb/blob/main/combined/heartbeat.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
