# 使用 Homebrew, apk, Nix 安装 thanos

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

## 安装

```sh
sudo av install brew:thanos
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install thanos
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add thanos
```

  证据: Alpine Linux edge package indexes: thanos from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz

- Nix (92%):

```sh
nix profile install nixpkgs#thanos
```

  证据: nixpkgs package indexes: pkgs/by-name/th/thanos/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:thanos
- **软件包管理器:** Homebrew
- **版本:** 0.42.4
- **来源摘要:** Highly available Prometheus setup with long term storage capabilities
- **主页:** <https://thanos.io>
- **仓库:** <https://github.com/thanos-io/thanos>
- **最后更新:** 2026-07-30T16:29:47Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- thanos (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

Thanos is a CNCF Incubating project that extends Prometheus deployments with global querying, high availability, and long-term storage. The README describes it as a set of composable components that can be added on top of existing Prometheus installations.

### 项目历史

Thanos was created in the Prometheus ecosystem to address operational gaps that appear when teams run many Prometheus servers or need longer metric retention than local Prometheus storage comfortably provides. The CNCF incubation announcement says the project was created at Improbable to enable reliable monitoring on a global scale.

The project architecture follows a component model rather than a single monolith. Its README lists aims including a global query view, unlimited retention, and high availability; its getting-started documentation presents Thanos as a single binary whose features can be deployed independently for gradual rollout.

Thanos moved into CNCF governance as the cloud-native monitoring ecosystem matured. The CNCF project page records acceptance into CNCF on July 14, 2019 and movement to Incubating maturity on August 19, 2020.

### 采用历史

The official Thanos repository maintains an adopters list including organizations such as Aiven, Monzo, Adobe, eBay, Sauce Labs, Tencent, Wise, ByteDance, SoundCloud, and many others. This gives the project unusually visible enterprise adoption compared with small CLI-only formulae.

The Thanos documentation also records talks, user stories, and blog posts from 2018 onward, including an introductory 2018 post, 2019 user stories, and later KubeCon/CNCF-era talks. That official documentation trail shows the project moving from early Prometheus-at-scale experiments into a standard option for multi-cluster and long-retention metrics systems.

### 使用方式

Operators use the `thanos` binary to deploy components such as Sidecar, Query, Store, Receive, Rule, Compact, and Query Frontend. The getting-started guide explains that Thanos can be added gradually and can run in Kubernetes or more traditional environments.

The package is especially relevant to Prometheus users who need object-storage-backed historical metrics, deduplication across high-availability Prometheus pairs, global query views across clusters, and downsampling for older data.

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

For package nerds, Thanos is a case where a Homebrew formula is not just a developer convenience but a way to get the same operational binary used in Kubernetes and cloud-native production systems. The README notes that release tarballs are built for major platforms and that every commit to main builds container images.

Its package-manager footprint in the input spans Homebrew, Alpine, and Nix, while its primary distribution story remains GitHub releases and OCI images. That split reflects modern infrastructure tooling: package managers help local testing and ops workflows, while production often consumes containers or Kubernetes manifests.

### 时间线

- 2018: Official docs list the introductory Thanos blog post and first Prometheus meetup slides.
- 2019: CNCF accepts Thanos on July 14, according to the CNCF project page.
- 2020: CNCF moves Thanos to Incubating on August 19.
- 2024: The README notes ThanosCon as a KubeCon Europe co-located event.

### Related projects

- Thanos is directly tied to Prometheus and its storage format, and the README positions it as an add-on to existing Prometheus deployments.
- The getting-started documentation points to prometheus-operator, kube-thanos, and community Helm charts as common Kubernetes deployment paths.

### 来源

- CNCF incubation announcement: https://www.cncf.io/blog/2020/08/19/toc-approves-thanos-from-sandbox-to-incubation/
- CNCF project page: https://www.cncf.io/projects/thanos/
- Official README: https://github.com/thanos-io/thanos#readme
- Official adopters list: https://github.com/thanos-io/thanos/blob/main/website/data/adopters.yml
- Official docs: https://thanos.io/tip/thanos/getting-started.md


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 其他软件包管理器记录

- Nix - thanos: normalized package name match | nixpkgs package indexes: pkgs/by-name/th/thanos/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - thanos - 0.42.0-r1: normalized package name match | Alpine Linux edge package indexes: thanos from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Highly available Prometheus setup with long term storage capabilities. CNCF Sandbox project. | https://github.com/thanos-io/thanos
- apk - thanos-openrc - 0.42.0-r1: normalized package name match | Alpine Linux edge package indexes: thanos-openrc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Highly available Prometheus setup with long term storage capabilities. CNCF Sandbox project. (OpenRC init scripts) | https://github.com/thanos-io/thanos


## Combined YAML source

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


## 来源

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