# 使用 Homebrew, chocolatey, Nix, pacman, apk, zypper, winget 安装 grafana-alloy

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

## 安装

```sh
sudo av install brew:grafana-alloy
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install grafana-alloy
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#grafana-alloy
```

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

- pacman (92%):

```sh
sudo pacman -S grafana-alloy
```

  证据: Arch Linux sync databases: grafana-alloy from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- apk (92%):

```sh
sudo apk add alloy
```

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

- zypper (92%):

```sh
sudo zypper install alloy
```

  证据: openSUSE Tumbleweed package metadata: alloy from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

### Windows

- Chocolatey (92%):

```sh
choco install grafana-alloy
```

  证据: Chocolatey community package catalog: grafana-alloy from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','google-workspace-sync'

- winget (92%):

```sh
winget install --id GrafanaLabs.Alloy -e
```

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

## 软件包事实

- **软件包键:** brew:grafana-alloy
- **软件包管理器:** Homebrew
- **版本:** 1.18.0
- **来源摘要:** OpenTelemetry Collector distribution with programmable pipelines
- **主页:** <https://grafana.com/oss/alloy-opentelemetry-collector/>
- **仓库:** <https://github.com/grafana/alloy>
- **最后更新:** 2026-07-27T16:47:25+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- alloy (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

Grafana Alloy is Grafana Labs' open source distribution of the OpenTelemetry Collector, designed to run telemetry pipelines for metrics, logs, traces, and profiles while retaining first-class Prometheus-oriented pipeline support.

### 项目历史

Alloy grew out of Grafana Agent and Grafana Agent Flow. Grafana Labs described Grafana Agent as a broad OSS telemetry agent introduced in 2020 for Prometheus-era collection problems, then positioned Alloy in 2024 as the successor that uses Agent Flow concepts while aligning with the OpenTelemetry Collector.

The launch announcement emphasized compatibility with OTLP, OpenTelemetry Collector, and Prometheus Agent workflows. That made Alloy both a migration target for Grafana Agent users and a standalone collector for mixed observability environments.

### 采用历史

Grafana Labs tied Alloy adoption to its recommendation that Grafana Agent users plan migrations before the Agent end-of-life date. Official migration documentation covers moving Agent Flow state directories and pipelines into Alloy layouts on Linux, macOS, Windows, and containers.

The package became important in Homebrew-style environments because it packages a production telemetry collector as a single serviceable CLI/daemon with documented platform-specific configuration paths.

### 使用方式

Operators use Alloy to receive, transform, scrape, relabel, and export telemetry. Common package-manager usage is installing the binary, editing config.alloy, and running Alloy as a long-lived service that forwards data to Grafana Cloud, an LGTM stack, or other compatible backends.

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

Alloy matters to package maintainers because it sits at the convergence point of Prometheus scraping, OpenTelemetry Collector components, service management, and cross-platform config conventions. It replaced several collector choices with one packaged executable for many Grafana observability setups.

### 时间线

- 2020: Grafana Agent rolled out as Grafana Labs' OSS telemetry agent.
- 2024-04-09: Grafana Agent and Grafana Agent Operator entered long-term support in favor of Alloy.
- 2024-04-10: Grafana Labs announced Grafana Alloy as an OpenTelemetry Collector distribution with Prometheus pipelines.
- 2025-11-01: Grafana Agent was expected to reach end of life, making Alloy the migration target.

### Related projects

- Grafana Agent and Grafana Agent Flow are Alloy's direct predecessors.
- OpenTelemetry Collector, Prometheus Agent, Grafana, Loki, Tempo, and Mimir are adjacent projects in the same collector and backend ecosystem.

### 来源

- <https://grafana.com/blog/grafana-agent-to-grafana-alloy-opentelemetry-collector-faq/>
- <https://grafana.com/blog/grafana-alloy-opentelemetry-collector-with-prometheus-pipelines/>
- <https://grafana.com/docs/alloy/latest/>
- <https://grafana.com/docs/alloy/latest/set-up/migrate/from-flow/>


## 安全说明

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/alloy/config.alloy
- macOS: $(brew --prefix)/etc/alloy/config.alloy
- Windows: %ProgramFiles%\GrafanaLabs\Alloy\config.alloy
## 其他软件包管理器记录

- Nix - grafana-alloy: normalized package name match | nixpkgs package indexes: pkgs/by-name/gr/grafana-alloy/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- pacman - grafana-alloy - 1.13.2-1: normalized package name match | Arch Linux sync databases: grafana-alloy from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | OpenTelemetry Collector distribution with programmable pipelines | https://grafana.com/oss/alloy-opentelemetry-collector/
- Chocolatey - grafana-alloy: normalized package name match | Chocolatey community package catalog: grafana-alloy from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','google-workspace-sync'
- apk - alloy - 1.17.1-r1: installed executable or alias match | Alpine Linux edge package indexes: alloy from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | OpenTelemetry Collector distribution with programmable pipelines | https://grafana.com/oss/alloy
- apk - alloy-openrc - 1.17.1-r1: installed executable or alias match | Alpine Linux edge package indexes: alloy-openrc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | OpenTelemetry Collector distribution with programmable pipelines (OpenRC init scripts) | https://grafana.com/oss/alloy
- zypper - alloy - 1.17.1-1.3: installed executable or alias match | openSUSE Tumbleweed package metadata: alloy from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | OpenTelemetry Collector distribution with programmable pipelines | https://github.com/grafana/alloy
- winget - GrafanaLabs.Alloy: installed executable or alias match | Windows Package Manager source index: GrafanaLabs.Alloy from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

View the package source record on GitHub. [combined/grafana-alloy.yml](https://github.com/mxcl/pkgdb/blob/main/combined/grafana-alloy.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
